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 2008

Tip: Looking for answers? Try searching our database.

selecting the right layout for master panel and subpanels

Thread view: 
Aryeh.Friedman@gmail.com - 21 Dec 2007 04:18 GMT
I have a app that builds it's gui up from nested panels and have run
into the following issues:

BoxLayout aligns all components to the right in inner panels (I want
it to the left) how can I correct this?

Even though I set Min/Max/Preferred size explicitly on inner panels
they components are resized when I grew/shrink the content pane... how
do I allow resizing the window but disallow component resizing?

The amount of vertical gap between BoxLayout components changes as the
container panel is changed in size... how can I force this not to
happen?

Oh and a side question how do I change the color of a JProgressBar
RedGrittyBrick - 02 Jan 2008 14:10 GMT
> I have a app that builds it's gui up from nested panels and have run
> into the following issues:
>
> BoxLayout aligns all components to the right in inner panels (I want
> it to the left) how can I correct this?

Use component.setAlignmentX()
http://java.sun.com/docs/books/tutorial/uiswing/layout/box.html#alignment

> Even though I set Min/Max/Preferred size explicitly on inner panels
> they components are resized when I grew/shrink the content pane... how
> do I allow resizing the window but disallow component resizing?

Use horizontal glue.
http://java.sun.com/docs/books/tutorial/uiswing/layout/box.html#filler

> The amount of vertical gap between BoxLayout components changes as the
> container panel is changed in size... how can I force this not to
> happen?

Use a rigid area?
http://java.sun.com/docs/books/tutorial/uiswing/layout/box.html#filler
I'd post an SSCCE as the problem is not clear.

> Oh and a side question how do I change the color of a JProgressBar

I don't know. Have you tried setForeground()?


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.