New to Swing, but not to Java. I am trying the following:
public void actionPerformed(ActionEvent e) {
methodA();
pane.repaint();
methodB();
pane.repaint();
}
Where methodB() takes a long time. I would like it to paint twice, yet the first paint call never happens. It's as if I did:
public void actionPerformed(ActionEvent e) {
methodA();
methodB();
pane.repaint();
}
Sorry if this is basic, but I've tried searching and I still don't understand why.
I've tried calling paint directly, which works as intended, except the application flickers on every repaint.