After calling repaint() on a JPanel out of an ActionListener for a JCheckBox, the JPanel has some…issues…they fix themselves upon minimizing and restoring but that’s a hassle for my clients. Any ideas on how to fix this?

Code is below
JCheckBox curr = new JCheckBox(choices.get(a));
curr.addActionListener(new ActionListener() {
public void actionPerformed(ActionEvent e)
{
//System.out.println(((JCheckBox)e.getSource()).getText());
if (specs.getSelectedItem()!=null&&!specs.getSelectedItem().toString().isEmpty())
{
String strSpec = specs.getSelectedItem().toString();
if (strSpec.matches("\\w+\\s\\w+"))
{
Time x = GraphCreator.parseTime(strSpec);
GC.getGraph(x);
GC.getGraph(x, new Team(((JCheckBox)e.getSource()).getText()));
}
else
{
GC.getGraph(new Team(((JCheckBox)e.getSource()).getText()),strSpec.trim());
}
}
pane.repaint();
}
});
pane.validate()andpane.repaint()could work. However that’s only when you are adding and removing components that will cause the layout to be affected/altered.