Try moving your UI operations into the EDT thread. Not making them in there can lead to unpredictable results.
EDT - Event Dispatch Thread
You should use the EDT thread to make changes to GUI so that this is the only thread that makes changes to it.
SwingUtilities.invokeLater(
new Runnable() {
public void run() {
//UI changes here
}
}
);