Riaan Nel wrote:Why don't you just call setPreferredSize() on your components? That is the more 'correct' way of doing it. Generally you shouldn't be messing with the way in which Swing components are painted.
I'm trying to resize view of whale panel with a big image and many Swing Components. There is no image in the code I've pasted above, but there is a rectangle instead.
I need buttons with zoom in/zoom out options, and I though that using Graphics2D.scale would be the best option, because Image.getScaledInstance takes too much time:(
Do you know how to fix this code?