3.7
April 23, 2008
rita1012
1.a)g.drawRect (45, 20, 100, 50)
b)g.drawLine (20, 20, 100, 100)
c)g.drawCir (100,100,50)
d)g.drawTri (100,100,50,50,200,200)
2. The program uses a modified version of the code for the ColorPanel class. Then added a paintComponent method that draws a blue rectangle containing a red text message when the window opens and whenever it is refreshed.
3. The method getWidth() and getHeight () return the current width and height of a panel. If these methods are called before the window is opened, they return a default value of 0.
4. Color, Font style , Font size and Font name.
Entry Filed under: Uncategorized
Leave a Comment
Some HTML allowed:
<a href="" title=""> <abbr title=""> <acronym title=""> <b> <blockquote cite=""> <cite> <code> <pre> <del datetime=""> <em> <i> <q cite=""> <strike> <strong>
Trackback this post | Subscribe to comments via RSS Feed