调用下面的painComponent方法是正确的:
public class CustomComponent{
private AnotherCustomComponent anotherComponent;
@override
protected void paintComponent(Graphics arg0) {
super.paintComponent(arg0);
anotherComponent.paintComponent(arg0);
arg0.fillRect(100, 100, 50, 150);
}
}