如何在 Swing 中将一个窗口停靠到另一个窗口?
我打开了两个 JFrame
。我让窗口 B 在窗口 A 的右侧生成,紧贴窗口 A 的右边缘。我希望它粘在窗口 A 上并随窗口 A 一起移动。我怎样才能让它做到这一点?
I have two JFrame
s open. I have window B spawn to the right of window A, snugged up to window A's right edge. I want it to stick to and move with window A. How can I make it do this?
我创建了一个名为 DockingManager 的类,它可以让您停靠伪 Winamp 风格的对话框和框架,
它还可以让您创建不同的集群并设置磁性级别来选择哪个框架拖动其他框架)
I made a class called DockingManager that lets you dock Dialogs and Frames pseudo Winamp Style
It also lets you make different clusters and set magnetic levels to choose which frame drags the others)