Language:

Search

How to get screen size in JAVA

  • Share this:
post-title
post-title

The below code helps to find out the screen size 

 

 

Dimensions sizeOfScreen = Toolkit.getDefaultToolkit().getScreenSize();
int screenheight = sizeOfScreen.getHeight(); //the height of screen
int screenwidth = sizeOfScreen.getWidth(); //the width of screen

 

Ammar Javed

Ammar Javed

Still Learning | Still Searching | Still Exploring | The secret of your success is determined by your daily agenda.