• 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

Develop an application for several screen resolutions

 
Greenhorn
Posts: 4
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Hi all,

When you have to develop an application for several screen resolutions, what do you do?

I want my application works under 800x600 resolution (minimum) but if i optimize it for this resolution, then under higher resolutions i'll have small windows or small components (JTextFields for example) inside them.

Sorry if I made ​​mistakes in my English.

Thank you very much.
 
Bartender
Posts: 11497
19
Android Google Web Toolkit Mac Eclipse IDE Ubuntu Java
  • Likes 1
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Why are you worried about a smaller window on larger screen resolution? Have you run the calculator app which comes bundled with the OS? Does it change size for larger resolutions?
The way to go about writing UIs is to use layout managers and leave the component sizes alone (unless you have a specific reason. e.g. your application might have a search facility which accepts free form text. In that case it might make sense to increase the JTextField visible columns)
 
Jose Lince
Greenhorn
Posts: 4
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator

Maneesh Godbole wrote:Why are you worried about a smaller window on larger screen resolution? Have you run the calculator app which comes bundled with the OS? Does it change size for larger resolutions?


you're right.

Maneesh Godbole wrote:The way to go about writing UIs is to use layout managers and leave the component sizes alone (unless you have a specific reason. e.g. your application might have a search facility which accepts free form text. In that case it might make sense to increase the JTextField visible columns)


I'm using layout managers but i don't understand what want you say with "leave the component sizes alone", maybe to leave the components with default values of columns and preferredsizes?.

Anyway, if i want that my application run in several resolutions, what should i do? should i choose a minimum resolution (e.g. 800 x 600) and set the windows sizes to look good on this resolution?

Thanks again.
 
Maneesh Godbole
Bartender
Posts: 11497
19
Android Google Web Toolkit Mac Eclipse IDE Ubuntu Java
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator

Jose Lince wrote:.. maybe to leave the components with default values of columns and preferredsizes?.


Yes that's what I meant.

Jose Lince wrote:Anyway, if i want that my application run in several resolutions, what should i do? should i choose a minimum resolution (e.g. 800 x 600) and set the windows sizes to look good on this resolution?


What minimum resolution would your users be running? Is that acceptable to you? OR is there a minimum window dimension you must have (Maybe there are some graphics which drive this requirement)? So the answer is it depends
Way I look at things there are 3 possible solutions
1) Don't bother with setting the frame size. Just call pack() on it. (Check the API docs to find out what this does in case you don't know it already)
2) Set the frame size
3) Set the size and set it as not resizable.
 
Bartender
Posts: 5167
11
Netbeans IDE Opera Java
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Still with Maneesh's it depends

4) Wrap the content in a JPanel in a JScrollPane with AS_NEEDED for both scroll bars.
 
Don't get me started about those stupid light bulbs.
reply
    Bookmark Topic Watch Topic
  • New Topic