/*!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
before you use any of these, make sure the size is already set using */
frame.setSize(width, height); /*
or use */
frame.pack(); /*
to set the size around all stuff on the frame
!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!*/
// with borders and title
frame.getSize();
//without borders and title
frame.getContentPane().getSize();