FileDocCategorySizeDatePackage
FrameWithCanvas.javaAPI DocExample1373Thu Nov 22 11:20:30 GMT 2001None

FrameWithCanvas

public class FrameWithCanvas extends Frame

Fields Summary
private Button
quitButton
private DrawingArea
canvas
private Scrollbar
myScrollBar
Constructors Summary
public FrameWithCanvas(String title, int width, int height)

  						// Constructor with parameters   
   	  super( title );
      setSize( width, height );       
      canvas = new DrawingArea();
      add(canvas,"Center");     
         
      quitButton=new Button("Quit Button");
      add(quitButton,"East");
      
      myScrollBar=new Scrollbar(Scrollbar.HORIZONTAL,0,100,0,width);
      add(myScrollBar,"South"); 	 
   
Methods Summary
public static voidmain(java.lang.String[] args)

  		
   	Frame f = new FrameWithCanvas( "Frame with Canvas", 500, 400 );
   	f.setVisible( true );