我收到错误消息:
JOptionPane 类型中的方法 showInternalConfirmDialog(Component, Object, String, int, int) 不适用于参数(new KeyListener(){}, String, String, int, int)
public void keyTyped(KeyEvent e) {
}
public void keyReleased(KeyEvent e) {
System.out.println("Key Released F1");
if(e.getKeyCode()==KeyEvent.VK_F1) {
/*here i get the error*/ int choice = JOptionPane.showInternalConfirmDialog(this, "Would you like to play the movie? "
,"Message", JOptionPane.WARNING_MESSAGE
, JOptionPane.OK_CANCEL_OPTION);
知道为什么我会收到此错误吗?