setTitle( "Drawing" ); setSize( 400, 300 ); setVisible( true );
g.drawLine( 10, 30, 100, 200 ); g.setColor( Color.red ); g.drawRect( 10, 30, 50, 50 ); g.setColor( Color.blue ); g.fillRect( 100, 100, 30, 40 ); g.setColor( Color.green ); g.drawString( "Hello", 300, 150 );