• Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

drawing lines

 
mnsv prasad
Greenhorn
Posts: 1
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Is it possible to draw a line on the Panel?
If yes how?
 
Tony Alicea
Desperado
Sheriff
Posts: 3226
5
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
The ( http://java.sun.com/products/jdk/1.2/docs/api/java/awt/Graphics.html ) Sun documentation says:
"A Graphics object encapsulates state information needed for the basic rendering operations
that Java supports. This state information includes the following properties:
The Component object on which to draw."


[...]

Since a Panel is a Component... You get the picture...
 
Marine
Greenhorn
Posts: 25
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
just overwrite the paint method and you are in buisness.
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic