Programming a GUI with resizable components using Java.swing

后端 未结 2 1708
囚心锁ツ
囚心锁ツ 2021-01-22 22:25

I\'m supposed to program a GUI. Every component in this GUI has to have the possibility to be resized dynamically.

So far I worked with GlassPane and ContentPane, added

2条回答
  •  我在风中等你
    2021-01-22 22:58

    You might be able to use the Component Resizer. It would need to be added to all components in advance.

    Or maybe you could add the listener when you select the component and then remove the listener when you deselect the component.

    The code you posted is of little help when guessing what your actual program is doing. When you have problems with your code you need to post a SSCCE.

提交回复
热议问题