Hi,
I'm trying to write some code which rescales the icon on a button when the frame is resized. I've created a ComponentAdapter which detects when the frame is resized, and upon detection calculates the scale factor, which is stored in a variable called
scaler. I then have the following code which attempts the rescale the icon:
However, when I run the program, the button itself resizes, but the icon doesn't change size, and if I reduce the size of the frame too much most of the icon gets cut off. Any suggestions for how I can fix this?
Sorry if the code snippet isn't enough - I can try making a
SSCCE if there's no obvious reason why what I'm doing doesn't work.
Thanks!