• Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other Pie Elite all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Jeanne Boyarsky
  • Ron McLeod
  • Paul Clapham
  • Liutauras Vilda
Sheriffs:
  • paul wheaton
  • Rob Spoor
  • Devaka Cooray
Saloon Keepers:
  • Stephan van Hulst
  • Tim Holloway
  • Carey Brown
  • Frits Walraven
  • Tim Moores
Bartenders:
  • Mikalai Zaikin

Resizing Layout with change in Screen Resolution

 
Greenhorn
Posts: 3
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
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.
 
Marshal
Posts: 79240
377
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
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.
 
Check your pockets for water buffalo. You might need to use this tiny ad until locate a water buffalo:
a bit of art, as a gift, the permaculture playing cards
https://gardener-gift.com
reply
    Bookmark Topic Watch Topic
  • New Topic