如何在 Java SWing 中双击子对话框,使其从父窗口弹出并嵌入到父窗口中?

发布于 2024-09-24 21:26:01 字数 182 浏览 2 评论 0原文

我想要一个带有多个子窗口小部件的主窗口,并且我希望子窗口小部件同时显示在主框架中,并且它们可以相互协调以通过主窗口进行布局 窗口区域。当我双击子小部件时,它可以弹出,再次双击时,它可以嵌入回来。 我之前在QT中通过QDockWidget完成了这一点,并且我了解到JavaDocking框架可以实现这一点,但我想知道是否可以仅通过SWing框架来完成?

I want a main window with several child widgets and I want the child widget to be shown in the main frame at the same time and they can coordinate with each other to layout through the main
window area. When I double click the child widget it can pop-up and when double click again it can embed back.
I have done this in QT by QDockWidget before and I've learned that the JavaDocking Framework can achieve this, but I want to know whether it can be done just by SWing framework?

如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

评论(1

卷耳 2024-10-01 21:26:01

如果您要求全功能对接,您可能应该编辑问题标题以反映这一点。

停靠非常复杂,因为它涉及动态布局、拖放和许多其他事情。您可以自己推出,主要是使用嵌套的JSplitPaneJTabbedPane并花费大量时间。

除了 JavaDocking 之外,请考虑开源(MIT 许可)FlexDock,或商业版JIDE Docking< /a>.

If you're asking for full featured docking, you should probably edit your question title to reflect that.

Docking is pretty complicated as it involves dynamic layout, drag-n-drop, and many other things. You could roll your own, essentially with nested JSplitPane and JTabbedPane and a lot of time.

Besides JavaDocking, consider the open source (MIT licensed) FlexDock, or the commercial JIDE Docking.

~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文