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

Tip: Looking for answers? Try searching our database.

Beginner's Layoutmanager Problems

Thread view: 
Daniel Fabian - 22 Mar 2004 12:52 GMT
Hello!

I'm trying to write my first java gui program (with swing) and I just can't
understand the layoutmanager concept.

What I'd like to have is a layout similar to the windows explorer: a tree on
the left side in a JScrollPane (occupying about 1/4 of the window's size by
default) and a JPane with some HTML on the right side (in a JScrollPane
too). The user should be able to move the border between the two items with
the mouse to fix the size for his needs.

I've tried to find a good tutorial on layout managers, but even failed to
find such (I found Sun's, which didn't get me any further). I would be very
glad for any help (a link to a good tutorial would do just fine).

Greetings,
Daniel
Carl Austin - 22 Mar 2004 12:57 GMT
If everything will be contained inside a JSplitPane you won't really have to
worry about layout managers.
You will create a JEditorPane (for the HTML) and a JTree. Add these to
JScrollPanes, then create a JSplitPane with these two JScrollPanes in it and
add the JSplitPane to a JPanel or something.
Seeing as you only ever have one component in another there is no need for
managing of the layout really.
If you want to know about layout managers though then try this :

http://www.enode.com/x/markup/tutorial/layout.html

Carl

> Hello!
>
[quoted text clipped - 13 lines]
> Greetings,
> Daniel
Daniel Fabian - 22 Mar 2004 13:08 GMT
> If everything will be contained inside a JSplitPane you won't really have to
> worry about layout managers.

Oh, wow, that was simple. I never heard of JSplitPane before, but it works
great! Thanks alot for your help!

Greetings,
Daniel

> Carl
Christophe Vanfleteren - 22 Mar 2004 13:34 GMT
>> If everything will be contained inside a JSplitPane you won't really have
> to
>> worry about layout managers.
>
> Oh, wow, that was simple. I never heard of JSplitPane before, but it works
> great! Thanks alot for your help!

You may find this usefull then:

http://java.sun.com/docs/books/tutorial/uiswing/components/components.html
http://java.sun.com/docs/books/tutorial/uiswing

Signature

Kind regards,
Christophe Vanfleteren



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.