Jcomponent won't show up in applet?

Hi:

I am new to java, I wrote a test applet in jbuilder envionment. It consists of a class extended from Jcomponent, It just overide the paintComponent(Graphics g) , so it fill a circle on the screen. Then in the applet, I added the component in the applet init method:

public class test extends Applet {

...

...

public void init(){

Mycomponent comp = new Mycomponent();

add(comp);

}

}

But when I run this applet, nothing showed up on the screen, By adding a print commond in the component's paintComponent method, it shows that the method was indeed called by the applet, but why the circle didn't showed up?

Thank you!

ls

[713 byte] By [ls00722] at [2007-9-26 16:23:12]
# 1
setBounds() for the comp should work. also check the color with which you are painting a circle.. it should be different from background color to be visible :-)
ravisekhark at 2007-7-2 19:56:16 > top of Java-index,Archived Forums,Swing...