Find centralized, trusted content and collaborate around the technologies you use most.
Teams
Q&A for work
Connect and share knowledge within a single location that is structured and easy to search.
我正在使用“可视化编辑器”来“绘制”我的 Swing GUI。我可以使用 VE 动态构建子面板的内容,还是必须使用 JPanel 的预定义子类(并使用 VE 构建它)?
您可以动态构建子面板的内容 - 例如基于文件或某些东西 - 可视化编辑器不会阻止您。
通常,VE 足够智能,可以看到您正在动态构建面板并显示内容(例如 JList 中文件的内容)
有时,VE 无法渲染项目,因为“控件太复杂”——但这并不经常发生。