Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations strongm on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

JOptionPane Q

Status
Not open for further replies.

jeremytaffy

Technical User
Sep 6, 2001
75
US
I want to be able to get the screen size from the host, and set that as the size of my JOption pane. Is this possible? If so, how? how can i first get the screen size, and then set the JOptionPane to use all of it.
Thanks in advance
J
 
you can get the screen size by using the Toolkit.getScreenSize() which returns a dimension object.

as for setting the JOptionPane, you can try using the methods it inherits from JComponent:

setMinimumSize()
setMaximumSize()
setPreferredSize()

Not sure if it will work but that is what will do it if you can.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top