我使用以下命令行在fedora上运行javafx: javac --module-path $JAVAFX_HOME --add modules javafx.controls AudioPlaylist.java
它给了我这些错误:
AudioPlaylist.java:123: error: cannot find symbol
VBoxBuilder.create().children(
symbol: variable VBoxBuilder
location: class AudioPlaylist
AudioPlaylist.java:132: error: cannot find symbol
HBoxBuilder.create().spacing(10).alignment(Pos.CENTER).children(next, play, stop, prog, mediaView).build()
^
symbol: variable HBoxBuilder
location: class AudioPlaylist
5 errors
我在网上搜索,它没有解决我的问题,因为我仍然无法运行程序。所以我才在这里问。我要运行的代码:https://pastebin.com/ttpfbqw7
1条答案
按热度按时间gpfsuwkq1#
您不能再像在示例中那样使用生成器类,因为该类已被删除。所以你的代码不再有效了:
你必须这样做:
vbox也是如此。由于构建器类很久以前就被删除了,我还建议您使用不同的教程来学习javafx。