The problem is in the paintComponent method of your MyPan class.
It should look like this:
public void paintComponent(Graphics g)
{
super.paintComponent(g);
g.drawString("Hello India",50,50);
}
:cheesy:
apcxpc
Junior Poster in Training
55 posts since Sep 2004
Reputation Points: 10
Solved Threads: 0
You should call setBackground() on the container rather than the frame.
Conn.setBackground
server_crash
Postaholic
2,111 posts since Jun 2004
Reputation Points: 113
Solved Threads: 20