如何使用 Java Swing 将选项卡拖到新窗口中?
有没有一种方法可以让我拥有一个选项卡式应用程序,如果我将选项卡拖出窗口,它会在新框架中打开该面板?
Is there a way that I can have a tabbed application, where if i drag a tab off the window, it opens that panel in a new frame?
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
是的,这是可能的,但您必须发布一些源代码,以查看到目前为止您所做的事情。我发现您可能对此链接感兴趣:
http://java-swing-tips.blogspot.com/2008/04/drag-and-drop-tabs-in-jtabbedpane.html
它解释了如何拖放选项卡,也许你可以将同样的原则应用到你的想法中。
此论坛中也有一个类似的问题,也许您想看看:
如何使用Java Swing实现可拖动的选项卡?
Yes it is possible but you will have to post a bit of source code, to see what you have done so far. I found this link that maybe is interesting to you:
http://java-swing-tips.blogspot.com/2008/04/drag-and-drop-tabs-in-jtabbedpane.html
It explain how to drag and drop tabs, maybe you can apply the same principle to your idea.
Also in this forum there is a similar question, maybe you wanna have a look:
How to implement draggable tab using Java Swing?