FileDocCategorySizeDatePackage
SwingExample.javaAPI DocExample866Tue Feb 12 13:32:04 GMT 2002myprojects.swingexample

SwingExample

public class SwingExample extends JPanel

Fields Summary
Constructors Summary
Methods Summary
public static voidmain(java.lang.String[] args)

		SwingExample s = new SwingExample();
	
public voidpaintComponent(java.awt.Graphics g)

		super.paintComponent(g);
		Dimension size = getSize();
		final int gap = 1;
		final int width = size.width-2*gap, height=size.height-2*gap;
		if((width > 0) && (height > 0)) {
			g.drawOval(gap,gap,width,height);
		}