简体   繁体   English

如何将 JPanel 添加到自动生成的 netbeans JFrame?

[英]how to add JPanel to auto generated netbeans JFrame?

I have auto generated netbeans GUI (JFrame) and I'm trying to add an external JPanel (different class) to the JFrame but it failed.我已经自动生成了 netbeans GUI(JFrame),我正在尝试将外部 JPanel(不同类)添加到 JFrame 但它失败了。 What i'm supposed to do?我该怎么办?

Note: JPanel is a web browser using DJ Native Swing.注意:JPanel 是一款 web 浏览器,使用 DJ Native Swing。

I would assume that you would add the JPanel to the JFrame's contentPane just as you would with a non-NetBeans GUI, but again we're sort of hamstrung until you can tell us what you've tried and how it failed.我假设您会像使用非 NetBeans GUI 一样将 JPanel 添加到 JFrame 的 contentPane 中,但是在您告诉我们您尝试过什么以及它是如何失败之前,我们还是有点手足无措。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM