Results 1 to 5 of 5
- 10-20-2010, 10:42 AM #1
Member
- Join Date
- Oct 2010
- Posts
- 11
- Rep Power
- 0
How to set the JFrame to System resolution
hi,
i designed one Frame in one system with the dimensions 1152 x 860.If i run this application in another System( with dimensions 1024 X 768) this Frame application is not fitted to that system . To solve this i take the system dimensions using this method "Toolkit.getDefaultToolkit().getScreenSize()" and i set this dimension to Frame using "setPrefferedSize()" method.But its not solved.please help me.
Thanks in advance,
Usha.
- 10-20-2010, 01:21 PM #2
Why is it not solved? What does it do instead?
You could just use setSize() instead of setPreferredSize().
Or you could do it this way:
There are other ways as well. Google is your friend.Java Code:frame.setExtendedState(Frame.MAXIMIZED_BOTH);
-
Also, are your containers using appropriate layout managers? If the suggestions above don't help, then consider creating and posting an SSCCE
- 10-20-2010, 02:02 PM #4
Member
- Join Date
- Oct 2010
- Posts
- 11
- Rep Power
- 0
thanks kevinWorkman.
Its working now.But i got another problem that Panels in the JFrame
are not fitted.
-
Similar Threads
-
Resolution of the application
By senorita2007 in forum New To JavaReplies: 1Last Post: 04-08-2010, 04:30 AM -
Screen Resolution Problems
By RicKaufman in forum AWT / SwingReplies: 1Last Post: 10-04-2009, 06:07 PM -
Resolution problem!
By jan1ey in forum New To JavaReplies: 1Last Post: 03-03-2009, 07:36 AM -
What's Your New Year's Resolution?
By CaptainMorgan in forum Forum LobbyReplies: 4Last Post: 11-16-2008, 09:05 PM -
How to change the resolution ?
By samson in forum Java 2DReplies: 1Last Post: 07-17-2007, 11:15 AM


LinkBack URL
About LinkBacks
Reply With Quote

Bookmarks