Package javax.swing

Examples of javax.swing.JButton.repaint()


        if (old != cancelButton) {
            this.cancelButton = cancelButton;

            if (old != null) {
                old.repaint();
            }
            if (cancelButton != null) {
                cancelButton.repaint();
            }
        }
View Full Code Here


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

  private int activeDay = -1;
View Full Code Here

    // everytime a property change, update the button with it
    PropertyChangeListener listener = new PropertyChangeListener() {
      public void propertyChange(PropertyChangeEvent evt) {
        Property prop = (Property)evt.getSource();
        prop.writeToObject(button);
        button.repaint();
      }
    };
    sheet.addPropertySheetChangeListener(listener);

    JTextArea message = new JTextArea();
View Full Code Here

  public void mouseExited (MouseEvent e) {
    JButton button = (JButton) e.getSource();
    button.setBackground(background);
    cancelButton.setForeground(foreground);
    button.repaint();
  }

  public void mouseClicked (MouseEvent e) {}
  public void mousePressed (MouseEvent e) {}
  public void mouseReleased (MouseEvent e) {}
View Full Code Here

TOP
Copyright © 2018 www.massapi.com. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.