Forums Register Login

Resizing Layout with change in Screen Resolution

+Pie Number of slices to send: Send
Hi all,

I am programming a Swing application. The entire gui of the application is divided into 9 equal sized panels arranged in 3 rows and 3 columns. Now some panels have tabbed panes and some have some buttons (JButtons). Now the screen resolution of my laptop is 1280x800 pixels. I am using layout managers to layout these panels and the objects inside them. I am using borderlayout and flowlayout predominantly. Now under the above mentioned screen layout everything is fine to look. but when I connect my laptop to a projector to show my GUI to others in a conference, the projector has a lower resolution, so the entire layout is mixed up. In particular the tabbed panes and buttons. I have given some lengthy names as heading of the tabbed panes and so instead of displaying linearly ( one after other ), they overlap. The button are of different sizes and are put in a panel with flowlayout. So the buttons in the right most side of the panel disappear under low resolution. What should I do. I dont mind if the names of the buttons and tabbed panes ends with "......", for example - I have a button called "Create/Modify". The button totally disappears under low resolution.
+Pie Number of slices to send: Send
Sounds like something which would sit better in the Swing Forum.

There are methods in the Toolkit class (you have to use the static getDefaultToolkit method first) which supply screen resolution and screen size, which you can use to resize your display. But you will never get a pretty display with FlowLayout. There are lots of layouts, but some people say to look for MigLayout as the best available.
Too many men are afraid of being fools - Henry Ford. Foolish tiny ad:
a bit of art, as a gift, the permaculture playing cards
https://gardener-gift.com


reply
reply
This thread has been viewed 2015 times.
Similar Threads
Issue in Displaying panel
Re: Using GridLayout with Buttons
invisible canvas
AWT Question.......help please!
Looking for layout advice
Building a Better World in your Backyard by Paul Wheaton and Shawn Klassen-Koop
More...

All times above are in ranch (not your local) time.
The current ranch time is
Mar 29, 2024 05:59:26.