When is the paint()-method called?
From: Jesper Sahner (jespersahner_at_hotmail.com)
Date: 10/28/04
- Next message: Tim Tyler: "Re: JBoss to go closed source?"
- Previous message: Lee: "Re: MMS Protocol and JMF"
- Next in thread: Paul H. van Rossem: "Re: When is the paint()-method called?"
- Reply: Paul H. van Rossem: "Re: When is the paint()-method called?"
- Reply: Thomas Weidenfeller: "Re: When is the paint()-method called?"
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]
Date: 28 Oct 2004 11:38:10 -0700
Hi!
A beginner's question: When is the paint()-method EXACTLY called in
the following little example?
import java.awt.*;
public class GWindow extends Frame
{
public void paint(Graphics g)
{
g.drawLine(0,0,50,50);
g.fillOval(5,20,300,30);
g.setColor(Color.green);
g.drawString("Hello",100,40);
}
}
public class ShowGWindow
{
public static void main(String[] arg)
{
GWindow w = new GWindow();
w.setSize(350,60);
w.setTitle("GWindow");
w.setVisible(true);
}
}
Regards,
Jesper
- Next message: Tim Tyler: "Re: JBoss to go closed source?"
- Previous message: Lee: "Re: MMS Protocol and JMF"
- Next in thread: Paul H. van Rossem: "Re: When is the paint()-method called?"
- Reply: Paul H. van Rossem: "Re: When is the paint()-method called?"
- Reply: Thomas Weidenfeller: "Re: When is the paint()-method called?"
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]
Relevant Pages
|
|