wood burning stoves
The moose likes Swing / AWT / SWT and the fly likes full size of the screen(urgent) Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login
JavaRanch » Java Forums » Java » Swing / AWT / SWT
Bookmark "full size of the screen(urgent)" Watch "full size of the screen(urgent)" New topic

full size of the screen(urgent)

netharam ram
Ranch Hand

Joined: Aug 09, 2001
Posts: 202
Hai, my problem is ,I wish to display a frame/window as windows screen. i.e. the full size of the screen.How to get the size of the screen i.e. the monitor used.My window/frame should be displayed as full screen as windows Explorer.
ravindran shanmugam

Joined: Aug 30, 2001
Posts: 15
if your class extends JFrame,JWindow,Frame or any other container
Dimension d = getToolkit().getScreenSize();
otherwise ,
u can also get the screenResolution using
syed fazal faheem

Joined: Jul 13, 2001
Posts: 12
There is no need for ur application to extend any class to get the toolkit object. U can get the default toolkit kit by a static method getDefaultToolKit()in java.awt.Toolkit class.
U can check ur screen size with the following piece of code:
import java.awt.*;
public class ScreenSize {
public static void main(String str[])
Dimension dim = (Toolkit.getDefaultToolkit()).getScreenSize();
System.out.println("Your screen size is... width: "+ dim.width +" ; height: "+dim.height);
Hope this solves ur problem.
I agree. Here's the link: http://aspose.com/file-tools
subject: full size of the screen(urgent)
It's not a secret anymore!