posted 20 years ago
I have a solution, but it requires my panel to have something like this
addComponentListener(
new ComponentAdapter() {
public void componentResized(ComponentEvent e) {
canvas.requestSetSize(canvas.getPreferredSize());
}
}
);
which is ugly, and besides, Buttons don't need this trick!!
Sun Certified Programmer for the Java 2 Platform