All pastes #514671 Raw Edit

Miscellany

public text v1 · immutable
#514671 ·published 2007-05-27 21:13 UTC
rendered paste body
public class CV extends Canvas {
	public void paint(Graphics g) {
		g.setColor(Color.green);
                g.fillRect(0, 0, this.getHeight(), this.getWidth());
	}
}

public class asdf {
	/**
	 * @param args
	 */
	public static void main(String[] args) {
		JFrame f = new JFrame();
		f.setSize(500, 500);

		JPanel p = new JPanel();
		p.setSize(500, 500);
		p.setLocation(0, 0);

		CV c = new CV();
		c.setSize(500, 500);
		c.setLocation(0, 0);

		p.add(c);
		f.add(p);

		f.setVisible(true);
	}

}