In this section, you will learn how to obtain the height and width of the specific screen.
The Toolkit class has a static method called getDefaultToolkit() and can be used to obtain the default Toolkit object for the user's system, which contains information about the user's specific machine. The method getScreenSize() return a Dimension object which contains the width and height of the screen.
Here is the source code of GetScreenSize.java
Output will be displayed as:
Rs. 20,000 US$ 300
Today: Rs. 10,000 US$150
Course Duration: 30 hrs
Posted on: November 1, 2008 If you enjoyed this post then why not add us on Google+? Add us to your Circles