Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Mike Lewis on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

JInternalFrame not showing... 1

Status
Not open for further replies.

drkhelmt

Programmer
Jun 15, 2004
86
US
I've been struggling with getting my internal frames to show and found the problem to be bigger than my code. Any ideas on what the problem really is is appreciated.

My code has one class for the JFrame with a JDesktopPane (desk). This class appears and seems to work fine. I have another class for a JInternalFrame. This class never appears as in the JDesktopPane, however if I change it to a simple JFrame it appears and works fine.

I've tried sending the JInternalFrame class the desktop, I've tried desk.add() in the JFrame class. I've tried deleting the JInternalFrame class and just adding the data as a new method in the JFrame class.... nothing seemed to work.

So I tried compiling the MyInterlaFrameDemo.java file from sun.com and was rather suprised that the internalframes never showed. I believe I have the latest and greatest Java version downloaded.

What might be the problem?

Andrew
a.k.a. Dark Helmet

"What's the matter Colonel Sandurz? Chicken?
 
Hey wangdong,

Thanks for the post. Is setVisible(true) the same function as show()? I know I tried show() but not sure if I tried setVisible(true). Also, why wouldn't the demo from Sun work?

Thanks

Andrew
a.k.a. Dark Helmet

"What's the matter Colonel Sandurz? Chicken?
 
Hey,

A working demo would be awesome! Does it have the JInternalFrames in a separate class?

Thanks again!

Andrew
a.k.a. Dark Helmet

"What's the matter Colonel Sandurz? Chicken?
 
THANK YOU!!!! This demo worked and gives me a lot to go on! Thank you sooo much!

Now comes the studying part for why mine doesn't work...

Andrew
a.k.a. Dark Helmet

"What's the matter Colonel Sandurz? Chicken?
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top