如何使用JavaBuilders创建JFreeChart控件?
如何使用 JavaBuilder 在 YAML 中创建 JFreeChart 控件?
我当前的 YAML 形式如下:
JFrame(name=frame, title=frame.title, size=packed, defaultCloseOperation=exitOnClose):
- JLabel(name=sortLabel, text=label.sorttext)
- JComboBox(name=sortComboBox, editable=false)
- JScrollPane(name=listScrollpane, vScrollBar=always, hScrollBar=never):
JList(name=batteryList)
- JButton(name=exitButton, text=button.exit, onAction=[$confirm,cancel])
- JPanel(name=graphPanel)
- MigLayout: |
[[fill]]
[] [grow] [grow]
sortLabel sortComboBox graphPanel
listScrollpane+2
exitButton
我尝试使用 JFreeChart
或 ChartPanel
来代替 JPanel(name=graphPanel)
,但在执行过程中我不断收到此错误调试:“JFreeChart 不是可识别的别名。”
我验证了 jcommon-1.0.16.jar 并jfreechart-1.0.13.jar 已添加到项目库(在 NetBeans 中)。
有谁知道我哪里出错了?
How can I create a JFreeChart control in YAML, using JavaBuilder?
My current form YAML follows:
JFrame(name=frame, title=frame.title, size=packed, defaultCloseOperation=exitOnClose):
- JLabel(name=sortLabel, text=label.sorttext)
- JComboBox(name=sortComboBox, editable=false)
- JScrollPane(name=listScrollpane, vScrollBar=always, hScrollBar=never):
JList(name=batteryList)
- JButton(name=exitButton, text=button.exit, onAction=[$confirm,cancel])
- JPanel(name=graphPanel)
- MigLayout: |
[[fill]]
[] [grow] [grow]
sortLabel sortComboBox graphPanel
listScrollpane+2
exitButton
I tried both JFreeChart
or ChartPanel
in place of JPanel(name=graphPanel)
, but I keep getting this error during debugging: "JFreeChart is not a recognized alias."
I verified jcommon-1.0.16.jar and jfreechart-1.0.13.jar have been added to the project libraries (in NetBeans.)
Does anyone know where I'm going wrong?
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
我假设您正在使用 javabuilders。这个库似乎与swing开发有关。因此它为所有 swing 类定义了 YAML 别名。 JFreeChart 类不会有别名,因为它不是 swing 类。
此 PDF 中有一个关于扩展 javabuilders 引擎的部分。
以下行看起来很有帮助
抱歉我不能更具体,但我以前没有真正使用过 javabuilders。
I assume you are using javabuilders. This library seems to be related to swing development. Hence it has defined YAML aliases for all swing classes. The JFreeChart class wont have an alias as it isn't a swing class.
There is a section on extending the javabuilders engine in this PDF.
The following line looks helpful
Sorry I can't be more specific, but I haven't really used javabuilders before.