aspose file tools*
The moose likes Swing / AWT / SWT and the fly likes Develop an application for several screen resolutions Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


Win a copy of Soft Skills this week in the Jobs Discussion forum!
JavaRanch » Java Forums » Java » Swing / AWT / SWT
Bookmark "Develop an application for several screen resolutions" Watch "Develop an application for several screen resolutions" New topic
Author

Develop an application for several screen resolutions

Jose Lince
Greenhorn

Joined: Aug 06, 2011
Posts: 4
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.
Maneesh Godbole
Saloon Keeper

Joined: Jul 26, 2007
Posts: 10535
    
    9

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)


[How to ask questions] [Donate a pint, save a life!] [Onff-turn it on!]
Jose Lince
Greenhorn

Joined: Aug 06, 2011
Posts: 4
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
Saloon Keeper

Joined: Jul 26, 2007
Posts: 10535
    
    9

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.
Darryl Burke
Bartender

Joined: May 03, 2008
Posts: 4664
    
    5

Still with Maneesh's it depends

4) Wrap the content in a JPanel in a JScrollPane with AS_NEEDED for both scroll bars.


luck, db
There are no new questions, but there may be new answers.
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: Develop an application for several screen resolutions