Home | Contact Us | FAQ | Search & Site Map | Link to Us
Sign In | Join | Other 45 Sites in Network
HomeAnnouncementsWhite Papers
Discussion GroupsFirst AidDatabasesJavaBeansGUIJava 3DVirtual MachineCORBASecurityToolsGeneral
Java DirectoryOpen Source ProjectsSample Book ChaptersUser GroupsWeb Resources
Related Topics
Databases.NETMore Topics ...

Java Forum / GUI / June 2004

Tip: Looking for answers? Try searching our database.

JInternalFrame display problem

Thread view: 
Kova - 21 Jun 2004 22:50 GMT
Hello.
I'm doing about box for my program and I don't know why but I actually
thaught that this is going to be easy.
I deceided to go with JInternalFrame and I can't get thing working. First I
created one instance at begining and deceided just to show her when needed.
I can't do even that. I put her in JDesktopPane inside main JFrame hidden
but when I use AboutForm.show(); nothing happens. So I started looking for
simplest example of JInternalFrame usage and found one:

------action performed (AboutMenuItem)------
JDesktopPane Desktop = new JDesktopPane();
Desktop.setVisible(false);  // without this blue rectangle adds to main Form
getContentPane().add(Desktop);
JInternalFrame frame = new JInternalFrame("About Playlist File Copier",
true, true, true, true);
frame.setLocation(10, 10);
frame.setSize(200, 150);
frame.setBackground(Color.white);
Desktop.add(frame);
frame.moveToFront();
---------------------------------------------------

Without second row blue rectangle adds itself to Form so I guess
JDesktopPane works but still no JInternalFrame showing up! Why?? Don't know
if it helps but except JDesktopPane main JForm has JPanel as a cointainer
(with more JPanels inside), box layout and JMenuBar of course.
I work with NetBeans. Thanks for replys.

--
Kova
Kova - 22 Jun 2004 16:45 GMT
solved

I used:
getLayeredPane().add(internalframe,  JLayeredPane.DEFAULT_LAYER);
internalframe.setBounds(10,10,200,200);
internalframe.setVisible(true);

--
Kova


Free Magazines

Get these publications absolutely FREE for up to 12 months. There are no hidden fees and no obligation. Simply choose a title, complete the application form and submit it. Read more ...

Oracle MagazineNetwork ComputingComputer WorldBio-IT WorldeWeekInformation WeekInfosecurity
 
Sign In
Join
My Latest Posts
My Monitored Threads
My Blog
My Photo Gallery
My Profile
My Homepage

Start New Thread
Enable EMail Alerts
Rate this Thread



©2008 Advenet LLC   Privacy Policy - Terms of Use
This website includes both content owned or controlled by Advenet as well as content owned or controlled by third parties.