PaintComponent Method

S

shruti

Hello,
can any one tell me when paintComponent(Graphics gc){} method will be
called???
it's needed that i have to extends JPanel.
in my prog m extending theJApplet class.
can paintComponent(Graphics gc){} will called if m extending the
JApplet..


plz tell me..
waiting 4 yr reply.

Regards,
Shruti.
 
T

Tor Iver Wilhelmsen

shruti said:
can any one tell me when paintComponent(Graphics gc){} method will be
called???

When the Swing framework, which builds on the AWT framework, gets
around to it - in the repaint thread. Basically, a lot of code you
will write in the future will be running in a framwrok-like
environment (like Swing, or a servlet container) where other code is
responsible for actually calling your methods. Get used to that.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

Forum statistics

Threads
474,266
Messages
2,571,087
Members
48,773
Latest member
Kaybee

Latest Threads

Top