• Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

How do i find the centre of the applet

 
david allen
Ranch Hand
Posts: 185
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
I want to draw a Hexagon. How do i set the coords so that it is exactly in the centre of the applet.
thanks david
 
Dirk Schreckmann
Sheriff
Posts: 7023
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Take a look at The Applet Class Documentation and notice that an Applet has a getWidth and a getHeight method that it inherits from Component.
 
With a little knowledge, a cast iron skillet is non-stick and lasts a lifetime.
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic