Re: Weird thing with JFrame
I believe the sizes of the title bar and borders of a JFrame are platform dependent, and I am not sure you can retrieve those dimensions (unless perhaps you create your own default look and feel - and even then I'm not sure how to do it). However, if you specify the dimensions of the main JPanel you add to the JFrame you can guarantee the drawable region is the dimension you want
Code java:
JFrame f = new JFrame();
f.getContentPane().setPreferredSize(new Dimension(640,480));
f.pack();
f.setVisible();
Re: Weird thing with JFrame