void drawOtherPanel() {
System.out.println("TEST PRINT"); // this gets printed
removePanels();
mainPanel.add(otherPanel);
validate();
repaint();
}
I'm working with some swing graphics code. I have this method which is supposed to draw a certain panel when a button is clicked, but it does nothing. Why does it not work?