> changes the size of a shape on the JPanel
We have no idea what you code is like to implement that change, so its hard to guess.
If you are doing custom painting to draw the shape in the Graphics method, then
you should need to invoke repaint on the panel to reflect the change.
If you are changing a "shape icon" on a JLabel, then the label should repaint itself automatically.
If you need further help then you need to create a
SSCCE (Short, Self Contained, Compilable and Executable, Example Program), that demonstrates the incorrect behaviour.
Don't forget to use the Code Formatting Tags so the posted code retains its original formatting. That is done by selecting the code and then clicking on the "Code" button above the question input area.