Hello,
In the below code I expected frame.getX() be 300 and frame.getY() be 200.
But in output frame.getX() be 200 and frame.getY() be 300.
import java.lang.*; import java.awt.GraphicsConfiguration; import javax.javax.swing.*; import javax.swing.JFrame; public class Main { static GraphicsConfiguration gc; public static void main(String[] args) { JFrame frame = new JFrame(gc); frame.setVisible(true); frame.setSize(300,200); frame.setLocation(200, 300); frame.setTitle("PNU"); System.out.println(frame.getWidth()); System.out.println(frame.getX()); System.out.printf("__________\n"); System.out.println(frame.getHeight()); System.out.println(frame.getY()); } }