1

I'm trying to make an ActionListener act, when user resizes the window in order to rescale the image i print within it. Is this achievable? In what way?

Note: I know this can be achieved via paintComponent method, but i want to do this using this approach if feasible.

halfer
  • 19,824
  • 17
  • 99
  • 186
nfsu
  • 113
  • 2
  • 10
  • 3
    Use [ComponentListener](https://docs.oracle.com/javase/tutorial/uiswing/events/componentlistener.html). – Sergiy Medvynskyy May 24 '18 at 08:21
  • [Similar example](https://stackoverflow.com/questions/25798156/resizing-icon-to-fit-on-jbutton-in-java/25798462#25798462); Possible duplicate [Dynamically resize jframe/image or scroll](https://stackoverflow.com/questions/46876708/dynamically-resize-jframe-image-or-scroll/46879727#46879727); [Window Resize event](https://stackoverflow.com/questions/22186077/window-resize-event/22186357#22186357) – MadProgrammer May 24 '18 at 08:30

0 Answers0