This week's giveaway is in the Android forum.
We're giving away four copies of Android Security Essentials Live Lessons and have Godfrey Nolan on-line!
See this thread for details.
The moose likes Swing / AWT / SWT and the fly likes Screen Size Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login

Win a copy of Android Security Essentials Live Lessons this week in the Android forum!
JavaRanch » Java Forums » Java » Swing / AWT / SWT
Bookmark "Screen Size" Watch "Screen Size" New topic

Screen Size

Karen Baog
Ranch Hand

Joined: Mar 02, 2005
Posts: 120
Hi guys!

I need to get the screen size so I can position my JFrame relative to the screen size.

I've searched this forum and there seems to be no thread on this.

Thanks to all.

amerzil co-ed student<br />"Praise be the Code"
Ernest Friedman-Hill
author and iconoclast

Joined: Jul 08, 2003
Posts: 24183

You want java.awt.Toolkit.getDefaultToolkit().getScreenSize().

[Jess in Action][AskingGoodQuestions]
Consider Paul's rocket mass heater.
subject: Screen Size
Similar Threads
Using Other Classes in my Main?
how to set the size of of a JPanel according to the Screen Size
Screen meshing into main screen
full size of the screen(urgent)
How to set a screen size