Results 1 to 3 of 3
  1. #1
    prashantgolu is offline Member
    Join Date
    Jul 2011
    Posts
    1
    Rep Power
    0

    Default graphics fillRect and getColor

    the fill Rect,setColor etc are all abstarct methods.....so how can we direclty use them with a graphics opject....

  2. #2
    DarrylBurke's Avatar
    DarrylBurke is online now Member
    Join Date
    Sep 2008
    Location
    Madgaon, Goa, India
    Posts
    11,242
    Rep Power
    19

    Default

    The object passed is a concrete subclass of Graphics (actually of Graphics2D) and implements all abstract methods.

    In a painting method override, print out the class name / superclass name to see for yourself.

    db

  3. #3
    DarrylBurke's Avatar
    DarrylBurke is online now Member
    Join Date
    Sep 2008
    Location
    Madgaon, Goa, India
    Posts
    11,242
    Rep Power
    19

Similar Threads

  1. Problem with fillRect() function
    By dreamstring in forum New To Java
    Replies: 6
    Last Post: 03-22-2011, 02:59 AM
  2. Drawing a graphics onto another Graphics ?
    By Ziden in forum Java Applets
    Replies: 0
    Last Post: 01-08-2011, 07:30 PM
  3. help changing the RGB of a fillRect
    By AnimeKitty in forum New To Java
    Replies: 3
    Last Post: 07-27-2010, 06:02 PM
  4. Help me with graphics
    By 7oclock in forum New To Java
    Replies: 12
    Last Post: 04-04-2009, 11:20 PM
  5. Help with 2d graphics please
    By xbox_nutter in forum New To Java
    Replies: 0
    Last Post: 04-02-2009, 11:48 AM

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •