本文整理了Java中java.awt.Window.addKeyListener()
方法的一些代码示例,展示了Window.addKeyListener()
的具体用法。这些代码示例主要来源于Github
/Stackoverflow
/Maven
等平台,是从一些精选项目中提取出来的代码,具有较强的参考意义,能在一定程度帮忙到你。Window.addKeyListener()
方法的具体详情如下:
包路径:java.awt.Window
类名称:Window
方法名:addKeyListener
暂无
代码示例来源:origin: jsettlers/settlers-remake
public void paintComponent(Graphics graphics) {
super.paintComponent(graphics);
if(first_draw) {
SwingUtilities.windowForComponent(this).addKeyListener(new GOSwingEventConverter(parent, parent));
first_draw = false;
}
if(offscreen) {
synchronized (wnd_lock) {
graphics.drawImage(bi, 0, 0, null);
graphics.dispose();
}
} else {
graphics.drawString("Press m to enable offscreen transfer", width/3, height/2);
}
}
};
代码示例来源:origin: com.threerings/nenya
root.addKeyListener(listener);
root.addMouseListener(listener);
root.addMouseMotionListener(listener);
代码示例来源:origin: threerings/nenya
root.addKeyListener(listener);
root.addMouseListener(listener);
root.addMouseMotionListener(listener);
代码示例来源:origin: stackoverflow.com
window.addKeyListener(new KeyAdapter() {
代码示例来源:origin: org.netbeans.modules/org-netbeans-modules-swingapp
SwingUtilities.convertPointToScreen(p, this);
win.setLocation(p.x, p.y);
win.addKeyListener(new KeyAdapter() {
@Override
public void keyPressed(KeyEvent ev) {
内容来源于网络,如有侵权,请联系作者删除!