Win a copy of Design for the Mind this week in the Design forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

JInternalFrame woes

 
xiss burg
Greenhorn
Posts: 3
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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
Posts: 4632
 
Gregg Bolinger
GenRocket Founder
Ranch Hand
Posts: 15302
6
Chrome IntelliJ IDE Mac OS X
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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.
 
xiss burg
Greenhorn
Posts: 3
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
=|
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic