如何为我的代码修复此错误
how to fixed this error for my code
'import java.awt.*;'
'import java.awt.event.*;'
'public void close(){'
'WindowEvent winClosingEvent = new WindowEvent(this,WindowEvent.WINDOW_CLOSING);'
'Toolkit.getDefaultToolkit().getSystemEventQueue().postEvent(winClosingEvent);
}'
我想这对你有帮助......
public void close() {
Window win = new Window(new Frame());
WindowEvent winClosingEvent = new WindowEvent(win, WindowEvent.WINDOW_CLOSED);
Toolkit.getDefaultToolkit().getSystemEventQueue().postEvent(winClosingEvent);
}
'import java.awt.*;'
'import java.awt.event.*;'
'public void close(){'
'WindowEvent winClosingEvent = new WindowEvent(this,WindowEvent.WINDOW_CLOSING);'
'Toolkit.getDefaultToolkit().getSystemEventQueue().postEvent(winClosingEvent);
}'
我想这对你有帮助......
public void close() {
Window win = new Window(new Frame());
WindowEvent winClosingEvent = new WindowEvent(win, WindowEvent.WINDOW_CLOSED);
Toolkit.getDefaultToolkit().getSystemEventQueue().postEvent(winClosingEvent);
}