Win a copy of Murach's Python Programming this week in the Jython/Python forum!
  • Post Reply Bookmark Topic Watch Topic
  • New Topic

Abrstract Graphics  RSS feed

 
Amanda Weber
Greenhorn
Posts: 28
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi - I was wondering if anyone can tell me - what class provides the implimintation for the Graphics class, which is an abstract class with many abstract methods. For example when I do g.drawLine() - what coding is it actually calling, since drawLine is abstract in the graphics class?
 
Dirk Schreckmann
Sheriff
Posts: 7023
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Good question. Let's see what they have to say about it over in the Swing / JFC / AWT forum...
 
Nathan Pruett
Bartender
Posts: 4121
IntelliJ IDE Java Spring
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Mine says sun.java2d.SunGraphics2D... I would guess this is either a different class for every platform, or that this same class calls different native libraries based on the platform... The point is that you shouldn't care what class actually does this, as long as you can call the abstract Graphics methods you can draw on the components.

Here's the class I used to figure this out...

 
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!