How can I support scaling a view displayed in a JScrollPane to avoid displaying JScrollBars up to a minimum size?
问题 The behavior I want to implement is to display a view at 1:1 scale by default. If its container is made larger (by the user dynamically resizing the parent JFrame) the view should be scaled to fit the larger area; if made smaller, the view should be scaled to fit the smaller area - up to a limit. When smaller than a minimum size, scroll bars should appear with a viewport to support navigating around the view which is displayed at its minimum scale. I have a poorly-functioning implementation