0
这是我目前正在尝试:如何在Java中使用.aiff文件?
final AudioClip note0 = new AudioClip(getClass().getResource("/Downloads/notes/A3.aiff").toString());
key0.setOnMouseClicked(new EventHandler<MouseEvent>()
{
@Override
public void handle(MouseEvent me)
{
note0.play();
}
});
我想打一个键(矩形对象)的说明(.AIFF音频文件)。但是,我不知道如何引用.getResource()中的文件路径。任何人都可以向我提供如何继续的建议吗?谢谢!