List of usage examples for javax.swing JButton repaint
public void repaint()
From source file:Cal.java
/** Unset any previously highlighted day */ private void clearDayActive() { JButton b; // First un-shade the previously-selected square, if any if (activeDay > 0) { b = labs[(leadGap + activeDay - 1) / 7][(leadGap + activeDay - 1) % 7]; b.setBackground(b0.getBackground()); b.repaint(); activeDay = -1;//ww w .j a v a2s . c o m } }