P
Peter Cheung
Hi
I have overrider all the paintXX method and did nothing in there. But why I still able to see the component on top of the JPanel?
thanks
from Peter ([email protected])
import java.awt.CardLayout;
public class Carousel extends JPanel {
public Carousel() {
setLayout(new CardLayout(0, 0));
b.setSize(100, 100);
}
public Component add(Component c) {
add(c, "");
return c;
}
public void paint(Graphics g) {
}
public void paintComponents(Graphics g) {
}
public void paintChildren(Graphics g) {
System.out.println("ss");
}
public void paintImmediately(int x, int y, int w, int h) {
}
public void paintImmediately(Rectangle r) {
}
public void repaint(long tm, int x, int y, int width, int height) {
}
}
I have overrider all the paintXX method and did nothing in there. But why I still able to see the component on top of the JPanel?
thanks
from Peter ([email protected])
import java.awt.CardLayout;
public class Carousel extends JPanel {
public Carousel() {
setLayout(new CardLayout(0, 0));
b.setSize(100, 100);
}
public Component add(Component c) {
add(c, "");
return c;
}
public void paint(Graphics g) {
}
public void paintComponents(Graphics g) {
}
public void paintChildren(Graphics g) {
System.out.println("ss");
}
public void paintImmediately(int x, int y, int w, int h) {
}
public void paintImmediately(Rectangle r) {
}
public void repaint(long tm, int x, int y, int width, int height) {
}
}