Example usage for javax.swing JButton repaint

List of usage examples for javax.swing JButton repaint

Introduction

In this page you can find the example usage for javax.swing JButton repaint.

Prototype

public void repaint() 

Source Link

Document

Repaints this component.

Usage

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
    }
}