Velocity Reviews

Velocity Reviews (http://www.velocityreviews.com/forums/index.php)
-   Java (http://www.velocityreviews.com/forums/f30-java.html)
-   -   SWING components adjustment in different resolutions - Should show scrollbars less than 800X600 and expand components over this resolution (http://www.velocityreviews.com/forums/t134820-swing-components-adjustment-in-different-resolutions-should-show-scrollbars-less-than-800x600-and-expand-components-over-this-resolution.html)

Bluetears76 07-01-2004 04:49 AM

SWING components adjustment in different resolutions - Should show scrollbars less than 800X600 and expand components over this resolution
 
I want to create a fairly complex GUI using any IDE at 800x600
resolutions and then I need the GUI to adjust itself on 1024X768 and
high resolutions. If I reduce the resolution, it should show
Scrollbars.
In otherwords, i need a layout which is expanding but should not
shrink from a certain level and show scrollbars instead.
Currently I am using JBuilder X to create the GUI with null layout and
use scrollbars when the resolution is reduced but when the resolution
is increased it shows empty space on right side.
Questions
1. Which layout to use to do that?
2. What is the best IDE to speed up such process and set the
components with the recommended layout
3. If I use Gridbag layout, which is not easy to set for complex
GUIs, how will I show scrollbars when the resolutions is reduced from
800x600

P.s. I have seen JGoodies forms and its layout, but could not find a
good IDE to work with it.

Regards

Larry Barowski 07-01-2004 09:01 PM

Re: SWING components adjustment in different resolutions - Should show scrollbars less than 800X600 and expand components over this resolution
 

"Bluetears76" <bluetears76@yahoo.com> wrote in message
news:3c1cfe69.0406302049.2975fa20@posting.google.c om...
> I want to create a fairly complex GUI using any IDE at 800x600
> resolutions and then I need the GUI to adjust itself on 1024X768 and
> high resolutions. If I reduce the resolution, it should show
> Scrollbars.
> In otherwords, i need a layout which is expanding but should not
> shrink from a certain level and show scrollbars instead.
> Currently I am using JBuilder X to create the GUI with null layout and
> use scrollbars when the resolution is reduced but when the resolution
> is increased it shows empty space on right side.
> Questions
> 1. Which layout to use to do that?
> 2. What is the best IDE to speed up such process and set the
> components with the recommended layout


You have to handle the case of different font sizes. The default
font sizes and sizes of fonts created in the normal way (using
the contructor that takes a point size argument) may vary widely.
The "same" font may be four times larger on one system than
another. A null layout is no good unless all the elements have
a fixed size.

> 3. If I use Gridbag layout, which is not easy to set for complex
> GUIs, how will I show scrollbars when the resolutions is reduced from
> 800x600


Just put the panel in a JScrollPane. When the size goes below the
minimum layout size, the scrollbars will appear. You may have to
tinker a bit with the minimum size of some components (by
subclassing and overriding getMinimumSize()) to get it to behave
exactly as you want.




All times are GMT. The time now is 10:42 AM.

Powered by vBulletin®. Copyright ©2000 - 2014, vBulletin Solutions, Inc.
SEO by vBSEO ©2010, Crawlability, Inc.