Hey all ,
I have a drawPanel class which extends from JPanel.
I am drawing graph on this drawPanel. I put this drawPanel into a
JScrollPane. But what should I do to make the drawPanel's size getting
bigger while I draw more on it? I found some suggestion online which said I
should write a component listener for drawPanel. But I still can't figure
out how it works.
Any help? Thanks in advance!!!
Christian Kaufhold - 23 Aug 2003 11:57 GMT
Hello!
> I have a drawPanel class which extends from JPanel.
> I am drawing graph on this drawPanel. I put this drawPanel into a
> JScrollPane. But what should I do to make the drawPanel's size getting
> bigger while I draw more on it? I found some suggestion online which said I
> should write a component listener for drawPanel. But I still can't figure
> out how it works.
The preferred size of the panel must be the size it wants to be.
Christian