SwingX 和 NetBeans 6.9.1 GUI 设计器 (JXCollapsiblePane/JXTaskPane)

发布于 2024-09-28 10:52:12 字数 680 浏览 1 评论 0原文

我是 SwingX 的新手,在使用 Netbeans 6.9.1 的 Pallete 管理器使用 JXCollapsiblePane 和 JXTaskPane 时遇到问题 具体来说:

对于 JXTaskPane

  1. 我从 JForm 中的托盘管理器中拖动 JXTaskPaneContainer
  2. 我将 JXTaskPane 从托盘管理器拖动到 JXTaskPaneContainer
    3.我尝试在 JXTaskPane 中添加 jpanel 或 jbutton,但收到消息“无法将组件包含在非空容器中”
    如果我以编程方式添加组件(如示例代码所示,我发现我没有收到错误并且似乎可以工作)

对于 JXCollapsiblePane

  1. 我从 JForm 中的托盘管理器中拖动 JXCollapsiblePane
  2. 我尝试添加一个jpanel 或 JXCollapsiblePane 中的 jbutton,但我收到消息“无法将组件封装在非空容器中”
    如果我以编程方式添加组件(如示例代码所示,我发现我没有收到错误并且似乎可以工作)

有人可以解释一下我做错了什么吗?使用 Netbeans 调色板设计器是否无法做到这一点? 我想以视觉方式设计我的表单。我尝试使用的组件可以吗?

谢谢。

I am new in SwingX and I have trouble using JXCollapsiblePane and JXTaskPane using Pallete manager of Netbeans 6.9.1
Specifically:

For JXTaskPane:

  1. I drag a JXTaskPaneContainer from pallete manager in a JForm
  2. I drag a JXTaskPane from pallete manager into JXTaskPaneContainer
    3.I try to add a jpanel or a jbutton in the JXTaskPane but I get the message "Cannot enclose components in a non-empty container"
    If I add the components programmatically (as in example code I found i don't get an error and seems to work)

For JXCollapsiblePane:

  1. I drag a JXCollapsiblePane from pallete manager in a JForm
  2. I try to add a jpanel or a jbutton in the JXCollapsiblePane but I get the message "Cannot enclose components in a non-empty container"
    If I add the components programmatically (as in example code I found i don't get an error and seems to work)

Can someone please explain what am I doing wrong?Is it not possible to do this using the Netbeans pallete designer?
I want to design my form visually. Is it possible for the components I am trying to use?

Thank you.

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

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

发布评论

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

评论(1

薄情伤 2024-10-05 10:52:12

解决了。
我的项目中缺少 swingx-beaninfo.jar

Solved it.
The swingx-beaninfo.jar was missing from my project

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