You state:
Edit: Also, I'm not using any layout manager. getContentPane().setLayout(null);
That's your problem. You should almost never use null layout. It is much easier to use and maintain a gui that uses layout managers in a smart way. Read the layout manager tutorials as they can help.