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 / January 2004

Tip: Looking for answers? Try searching our database.

Newbie: How to stack MDI GUI

Thread view: 
Falko Zurell - 27 Jan 2004 15:03 GMT
Hello,

I like to create a multi document interface (MDI) GUI. Therefore I
extend my main class from JFrame and use a JDekstopPane for the MDI.

Now I like 3 JInternalFrames to display the actual content. In all these
internal Frames I will have content which has to be scrolled. So how do
I initialize this?

I tried (in principle)

JInternalFrame.setContentPane(new JScrollPane())

mypanel = new JPanel()

JPanel.add(new JLabel("MyLabel"));

JInternalFrame.getContentPane().add(myPanel);

JDesktopPane.add(JInternalFrame);

but this doesn't work. I see the internal frame but not the Panel or
actually the label inside the frame.

thanks

Falko
John Ratliff - 27 Jan 2004 20:17 GMT
> Hello,
>
[quoted text clipped - 6 lines]
>
> I tried (in principle)

Try this instead:

Assuming frame is a JInternalFrame refernece, and desktop is a
JDesktopFrame reference.

JPanel panel = new JPanel();
JLabel label = new JLabel("MyLabel");

panel.getContentPane().add(label);

JScrollPane pane = new JScrollPane(panel);
frame.getContentPane().add(pane);

desktop.getContentPane().add(frame);

--Dominic

> JInternalFrame.setContentPane(new JScrollPane())
>
[quoted text clipped - 12 lines]
>
> Falko


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.