Results 1 to 2 of 2
  1. #1
    goldhouse is offline Senior Member
    Join Date
    Mar 2007
    Posts
    134
    Rep Power
    0

    Default paint() and paintComponent()

    How is the paint and paintComponent Differ () ?

  2. #2
    goldhouse is offline Senior Member
    Join Date
    Mar 2007
    Posts
    134
    Rep Power
    0

    Default

    I got the answers ....

    Swing components has the paintComponent method while Non-swing AWT components do not have a paintComponent method.

    A Swing component's default paint() has mainly three phases
    1)painting the component
    2) painting the component's border
    3) finally painting all its children.
    Overriding paintComponent in a custom Swing component only affects the drawing of the component itself without impacting these other phases of drawing.

Similar Threads

  1. Problem going outside paintComponent
    By Thez in forum Java 2D
    Replies: 9
    Last Post: 12-08-2007, 05:59 PM
  2. Drawing outside paintComponent()
    By DarkSide1 in forum Java 2D
    Replies: 2
    Last Post: 11-08-2007, 11:36 PM

Posting Permissions

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