wood burning stoves*
The moose likes Swing / AWT / SWT and the fly likes JInternalFrame woes  Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


Win a copy of Android Security Essentials Live Lessons this week in the Android forum!
JavaRanch » Java Forums » Java » Swing / AWT / SWT
Bookmark "JInternalFrame woes  " Watch "JInternalFrame woes  " New topic
Author

JInternalFrame woes

xiss burg
Greenhorn

Joined: Mar 04, 2009
Posts: 3
the question is how to correctly add a JInternalFrame to a JFrame(already with lots of other components in it(JPanels, JTables, JButtons, etc) and make it appear over everything. If I add it to the contentPane it appears behind everything and lots of strange things start to happen =|. If I add to the layeredPane nothing happens...

Thanks
Michael Dunn
Ranch Hand

Joined: Jun 09, 2003
Posts: 4632
http://forums.sun.com/thread.jspa?threadID=5372067&tstart=0
Gregg Bolinger
GenRocket Founder
Ranch Hand

Joined: Jul 11, 2001
Posts: 15299
    
    6

First, the use case is not what a JInternalFrame is used for. Secondly, looks like you've been getting some help on the Sun forums but are unwilling to help by providing some code. I don't suspect you'll get much more help here for the same reasons if you continue down that path. We can't magically look into your computer and tell you why your code doesn't work.

But I guess my first question is back to my first statement. I'm with everyone else in saying that a JDialog is the preferred solution. You asked why JInternalFrame is being discouraged. It isn't being discouraged because it it buggy, but rather because of misuse. To get what you are after you are going to have to look into layered panes and/or the Glass Pane to achieve what you want.


GenRocket - Experts at Building Test Data
xiss burg
Greenhorn

Joined: Mar 04, 2009
Posts: 3
=|
 
It is sorta covered in the JavaRanch Style Guide.
 
subject: JInternalFrame woes
 
Similar Threads
how to change cursor position in Swing?
can you resolve these questions?Thanks.
JInternalFrame JScrollPane JTextarea
How to add a button to the Title bar?
MouseMotionListener