How to change resolution to screens?

I developed one Screen with setting 800x600 resolution in java.
If i change the resolution from 800x600 to 1024x768 it look very small.
now i want the same effects of the screen when i do in 800x600 in 1024x768.
And How i get system resolution from the system in java? If there is a specific property to set system resolution in java please mention that also.
Who is Participating?
expertmbConnect With a Mentor Commented:

 import java.awt.*;

public class Screen{
public static void main(String[] args){

      Dimension screen_resolution = java.awt.Toolkit.getDefaultToolkit().getScreenSize();
      int screen_width = screen_resolution.width;
      int screen_height = screen_resolution.height;

      System.out.println("width = " + screen_width);
      System.out.println("height = " + screen_height);


when setting the size ,replce hard coded value to these variables.

 good luck
 happy new year

All Courses

From novice to tech pro — start learning today.