Skip to main content

JRootPane -- Nested GlassPane example?

3 replies [Last post]
aberrant
Offline
Joined: 2006-02-02
Points: 0

I have a technique that allows arbitrary rootpanes and hence glasspanes. This means you one could have a glasspane over a just a single component instead of the entire JFrame or JDialog. In the end it is like a poor mans JXLayer. Is this something to put in the tutorials or is it too much of a hack?

Reply viewing options

Select your preferred way to display the comments and click "Save settings" to activate your changes.
sfshaza
Offline
Joined: 2004-06-03
Points: 0

I had to think about this for a bit. I guess I don't mind posting a hack, so long as it's identified as a hack. And we aren't likely to roll any hacks back into the tutorial itself. :-)

Sharon

aberrant
Offline
Joined: 2006-02-02
Points: 0

Well see thats the hard part. I don't know if it's a hack. I implement an interface and adhere to it's contract. As far as I can tell there is no requirement that a root pain container be a top level component. so I'm not sure. Maybe I should post this to another forum and get some attention on it.

aberrant
Offline
Joined: 2006-02-02
Points: 0

I've posted the code for people to evaluate.

http://wiki.java.net/bin/view/Projects/RootPaneDemo