3个回答
展开全部
代码:
1、
this.addWindowListener(new WinClose() );
2、
implements WindowListener
3、
public void windowOpened(WindowEvent e) {
}
public void windowIconified(WindowEvent e) {
}
public void windowDeiconified(WindowEvent e) {
}
public void windowDeactivated(WindowEvent e) {
lab.setText("失去焦点");
}
public void windowClosing(WindowEvent e) {
}
public void windowClosed(WindowEvent e) {
}
public void windowActivated(WindowEvent e) {
lab.setText("得到焦点");
}
1、
this.addWindowListener(new WinClose() );
2、
implements WindowListener
3、
public void windowOpened(WindowEvent e) {
}
public void windowIconified(WindowEvent e) {
}
public void windowDeiconified(WindowEvent e) {
}
public void windowDeactivated(WindowEvent e) {
lab.setText("失去焦点");
}
public void windowClosing(WindowEvent e) {
}
public void windowClosed(WindowEvent e) {
}
public void windowActivated(WindowEvent e) {
lab.setText("得到焦点");
}
本回答被提问者采纳
已赞过
已踩过<
评论
收起
你对这个回答的评价是?
展开全部
f.addWindowListener(WinClose); //为窗口f注册窗口事件监听器为WinClose类对象
代码2:
itemLiterature.setAccelerator(KeyStroke.getKeyStroke('A'));
代码3:
menu.addSeparator();
不一定正确仅供参考
代码2:
itemLiterature.setAccelerator(KeyStroke.getKeyStroke('A'));
代码3:
menu.addSeparator();
不一定正确仅供参考
已赞过
已踩过<
评论
收起
你对这个回答的评价是?
推荐律师服务:
若未解决您的问题,请您详细描述您的问题,通过百度律临进行免费专业咨询