我得到這個錯誤:消息對話框錯誤
cannot find symbol
symbol: method showMessageDialog(<anonymous javax.swing.AbstractAction>,java.lang.String,java.lang.String,int)
有人能幫助我嗎? 感謝
exitAction = new
AbstractAction("Esci") {
public void actionPerformed(ActionEvent e) {
if (rcStatus ==1) {
JOptionPane.showMessageDialog(this,
"Thread running. Choose STOP before
exit",
"Error", JOptionPane.ERROR_MESSAGE);
}
else {
System.exit(0);}
}
};
exitAction.putValue(Action.NAME,
"Exit");
exitAction.putValue(Action.SHORT_DESCRIPTION,"Close");
它是private void createActions(){......}的一部分我應該重寫整個代碼嗎?謝謝 – max 2011-01-12 15:39:36