• 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
  • Tim Cooke
  • Ron McLeod
  • paul wheaton
  • Jeanne Boyarsky
Sheriffs:
  • Paul Clapham
  • Devaka Cooray
Saloon Keepers:
  • Tim Holloway
  • Roland Mueller
  • Himai Minh
Bartenders:

Control the monitor resolution.

 
Greenhorn
Posts: 15
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
How can I control client's monitor resolution for my application? for example, my application only runs in 800*600, for ther higher , it will change the resolution or center it; for the lower, it won't run.

any hint is appreciated.

tony
 
Bartender
Posts: 4121
IntelliJ IDE Spring Java
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Tony,
Why (and how?) are you chaning the client's monitor resolution? Why not have your application change its display to fit in the clients resolution... I know that GridBagLayout (although it is a pain to use...) was basically made for this kind of thing... It moves components around in a set way as the application size changes. Most of the other layout managers can do this to some extent too... although the results are not as well controlled as GridBagLayout...
HTH,
-Nate
 
tony lu
Greenhorn
Posts: 15
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Actually, I am developing games, I want players only see my game when he/she start my application. at least , I have to get the monitor resolution , and make my application to cover the whole desktop.
 
Ranch Hand
Posts: 1492
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Tony,
You can not control your client's monitor resolution. You can however query the resolution and alter your application to execute correctly under it. You should never write ANY application that automatically changes anything on the client side. They didn't name it that for nothing!
The following code can be used to get the screen size:

Enjoy,
Manfred.
 
tony lu
Greenhorn
Posts: 15
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Thank you very much, I will have a try.
reply
    Bookmark Topic Watch Topic
  • New Topic