getting resolution of monitor

J

Jean Paul

I was wondering if it is possible to create a window, where the size
is dependant on the resolusion that's currently being used. That is it
should set the size automaticly if run on different computer where the
resolution setting for the monitors are different.
 
A

Ann

Jean Paul said:
I was wondering if it is possible to create a window, where the size
is dependant on the resolusion that's currently being used. That is it
should set the size automaticly if run on different computer where the
resolution setting for the monitors are different.


import java.awt.Toolkit;
Dimension myScreenSize = Toolkit.getDefaultToolkit().getScreenSize();
 
A

Andrew Thompson

I was wondering if it is possible to create a window, where the size
is dependant on the resolusion that's currently being used.

<http://java.sun.com/j2se/1.5.0/docs/api/java/awt/Toolkit.html#getScreenSize()>
<http://java.sun.com/j2se/1.5.0/docs/api/java/awt/Toolkit.html#getScreenResolution()>

BTW - comp.lang.java.programmer, comp.lang.java.help, comp.lang.java.gui
is far too wide a cross-post* for this basic question. Please restrict
your posts to c.l.j.help for the moment.

* <http://www.physci.org/codes/javafaq.jsp#xpost>

[ Follow-Ups set to c.l.j.help ]

--
Andrew Thompson
http://www.PhySci.org/codes/ Web & IT Help
http://www.PhySci.org/ Open-source software suite
http://www.1point1C.org/ Science & Technology
http://www.lensescapes.com/ Images that escape the mundane
 
J

Jean Paul

Andrew Thompson said:
I was wondering if it is possible to create a window, where the size
is dependant on the resolusion that's currently being used.

<http://java.sun.com/j2se/1.5.0/docs/api/java/awt/Toolkit.html#getScreenSize()>
<http://java.sun.com/j2se/1.5.0/docs/api/java/awt/Toolkit.html#getScreenResolution()>

BTW - comp.lang.java.programmer, comp.lang.java.help, comp.lang.java.gui
is far too wide a cross-post* for this basic question. Please restrict
your posts to c.l.j.help for the moment.

* <http://www.physci.org/codes/javafaq.jsp#xpost>

[ Follow-Ups set to c.l.j.help ]

Thnx guys!!!
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

Forum statistics

Threads
473,755
Messages
2,569,537
Members
45,020
Latest member
GenesisGai

Latest Threads

Top