Skip to Main Content

Java Programming

Announcement

For appeals, questions and feedback about Oracle Forums, please email oracle-forums-moderators_us@oracle.com. Technical questions should be asked in the appropriate category. Thank you!

PaintComponent(Graphics) method

807569Jul 11 2006 — edited Jul 11 2006
Hi,

I use Java and Netbeans 5 in order to develop an application.
So, in a JFrame i create a customed JPanel, in the class of this customed JPanel a have the paintComponent method which is not called automatically! I can't understand the reason!

<code>
public void paintComponent(java.awt.Graphics g){
super.paintComponent(g);
this.g = g; // downcast to Graphics2D
}
</code>

Please help.
Thank you.
Comments
Locked Post
New comments cannot be posted to this locked post.
Post Details
Locked on Aug 8 2006
Added on Jul 11 2006
5 comments
393 views