How to lock the resolution in JAVA2D rendering environment

Not sure exactly what you are hoping to achieve but you might want to look at setResizable

If you want to distort the display to ‘fit’ the new size I can think of 2 alternatives

  1. scale change the scale based on the previous and the new display size
  2. in the draw method all positions and sizes used for draw commands e.g. line, rect, ellipse etc. are expressed as a proportion of the display width and height
1 Like