所以,我有一个名为JButton ActionListener的重命名的JFrame。下面的下面的文本是Action Listeners in Action Listeners错误
JFrame rename = new JFrame("Rename File");
//other code
JButton renameb = new JButton();
renameb.addActionListener(new ActionListener()
{
@Override
public void actionPerformed(ActionEvent e)
{
Console.file = namef.getText();
dispose();
}
});
,每当我运行它,它只是表明这一点:
http://sp.itbind.com/s/misha/Screen%20Shot%202016-11-17%20at%2011.05.27%20PM.png (我不得不把一个链接,因为复制粘贴不工作)
是否有在控制台的任何错误/警告? – Jobin
@Jobin不,它就是这样。我不知道为什么 –
可以发布整个代码? – Jobin