problem is:
a JPanel is 300 width and 300 height
now i draw some graphics(not image) on this panel using
paintComponent(..) method
but the graphics get a size of 300x400.
the JPanel is set resizeable to false, so how to display the graphics
properly ?
klynn47@comcast.net - 24 Feb 2005 22:13 GMT
I would suggest creating a JScrollPane and adding the panel to it.
Whenever you draw on the panel, reset the preferred size and revalidate
it so that if you can't see all of the things you've drawn, there will
be scrollbars so that you can scroll to see everything on the panel.
javaSwing - 25 Feb 2005 10:07 GMT