WIN7下,兩邊邊框約10個piexls
JFrame f = new JFrame("JFrameClientWidth Demo");
f.setSize(400, 300);
f.setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE);
Rectangle rc=f.getContentPane().getBounds();
System.out.printf("x=%d, y=%d, width=%d, height=%d\n", rc.x, rc.y, rc.width, rc.height);
結果是:
x=0, y=0, width=392, height=273