All pastes #390078 Raw Edit

Miscellany

public java v1 · immutable
·published 2007-03-11 03:38 UTC
rendered paste body
import javax.swing.*;import java.awt.*;public class Testing {  public static void main(String[] arg) {    JFrame frame = new JFrame();    JLabel label = new JLabel() {      int c = 0;      public void paint(Graphics g) {        super.paint(g);        invalidate();        c++;        setText(new Integer(c).toString());      }    };    frame.add(label);    frame.pack();    frame.show();  }}