Scaling and zoom

后端 未结 1 1881
粉色の甜心
粉色の甜心 2021-01-20 16:32

I need to implement zoom for a JDesktopPane contained in a JScrollPane. I have had prior success zooming by overriding the paintComponent(...

1条回答
  •  醉梦人生
    2021-01-20 17:15

    ScaledPanel shows how to scale mouse coordinates using explicit transformation methods: scaleX, scaleY, unScaleX and unScaleY. Alternatively, you can use an inverse transformation, as shown here.

    0 讨论(0)
提交回复
热议问题