It seems behavior I witnessed in my program earlier this week is due to something else, the SSCCE using only layout managers failed to resize the image
sorry for the rabbit chase knightmetal!
...
Type: Posts; User: JonLane
It seems behavior I witnessed in my program earlier this week is due to something else, the SSCCE using only layout managers failed to resize the image
sorry for the rabbit chase knightmetal!
...
My experience is if you tell the image to be added inside a boarderlayout/Center it has demands on the object for resizing, and will demand it to be a certain size, so rethinking it, you would need...
EDIT:
the order you add things makes a difference too.
add(panel);
panel.add(label, BorderLayout.CENTER);
repaint();
panel.repaint();
can probably be shortened to just reversing the...
well if your image is inside your resizable frame, I would suggest to try giving your frame the BorderLayout, then add your image to the center area.
(do a search on BorderLayout for cut and paste...