且构网

分享程序员开发的那些事...
且构网 - 分享程序员编程开发的那些事

如何在Java Swing中将JFrame放入现有的JPanel中?

更新时间:2023-12-05 18:20:28

我浏览了源代码,我看到AWindow.java具有内部面板(APanel.java)来保存窗口的内容,并且还具有一个返回内容面板对象(getAPanel())的public方法.这样,我就可以将其用于将窗口的内容提取到其他容器中.

I had skimming the source codes, I saw that the AWindow.java has internal panel (APanel.java) to hold the window's content, and it also has a public method to return the content panel object (getAPanel()). With this, I can use it for fetching the window's contents into other container.

最后,我决定在VTreePanel的右侧区域中使用JTabbedPane来显示弹出窗口的内容.

Finally, I decided to use JTabbedPane in the right area of VTreePanel for displaying the pop-up window's contents.