gpt4 book ai didi

java - 什么是非可视 bean?

转载 作者:行者123 更新时间:2023-12-01 16:03:54 25 4
gpt4 key购买 nike

使用 JForm Designer,我尝试将属性窗口中的 JPanel 类从 JPanel 更改为各种自定义类,所有这些类都是 JPanel 的子类。

有时有效,有时失败并显示消息:

panel1:无法将非顶级组件转换为非可视 bean。

什么是非可视 bean?为什么我的一些子类被识别为可视 bean 与非可视 bean?

最佳答案

关于这个IBM site它说:

Non-visual beans You can use the non-visual beans to build Java™ and

Web client applications that require a customized user interface. The non-visual beans support the standard bean programming model by providing default constructors, properties, events and a serializable interface. You can use the non-visual beans in builder tools that support introspection.

Visual beans The visual beans are customizable, Swing-based, graphical

user interface components. Use the visual beans to build Java applications for Windows®. You can place them within windows and dialogs of Java-based applications. Because the visual beans are built using the non-visual beans (as a data model), you must use them in conjunction with the non-visual beans when building an application.

关于java - 什么是非可视 bean?,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/3111253/

25 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com