File APIs for Java Developers
Manipulate DOC, XLS, PPT, PDF and many others from your application.
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 Murach's Java Servlets and JSP this week in the Servlets 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]
Don't get me started about those stupid light bulbs.
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