How do I get my screen size?

Category: java.awt, viewed: 5983 time(s).
package org.kodejava.example.java.awt;

import java.awt.Dimension;
import java.awt.Toolkit;

public class ScreenSizeExample {
    public static void main(String[] args)
    {
        Dimension screenSize = Toolkit.getDefaultToolkit().getScreenSize();
        
        System.out.println("Screen Widht: " + screenSize.getWidth());
        System.out.println("Screen Height: " + screenSize.getHeight());
    }
}
Click here to lend your support to: Kode Java Org and make a donation at www.pledgie.com !

 

Uncensored Newsgroups
Download Hundreds of Complimentary Industry Resources

Get hundreds of popular Industry magazines, white papers, webinars, podcasts, and more; all available at no cost to you. With more than 600 complimentary offers, you'll find plenty of titles to suit your professional interests and needs. Click Here and Sign up today!

Java Training

Sponsored Links

Our Friends

Statistics

Locations of visitors to this page
visitor stats