当前位置: 技术问答>java相关
如何判断左右同时按键??
来源: 互联网 发布时间:2015-03-14
本文导语: 如何判断左右同时按键??大家讨论讨论 | /* A basic extension of the java.applet.Applet class */ import java.awt.*; import java.lang.*; import java.applet.*; public class DoubleClickApplet extends Applet { Stri...
如何判断左右同时按键??大家讨论讨论
|
/*
A basic extension of the java.applet.Applet class
*/
import java.awt.*;
import java.lang.*;
import java.applet.*;
public class DoubleClickApplet extends Applet
{
String mouseClickedString = "Mouse event : none";
String mouseClickedString2 = "Mouse double click : no";
long lastDownTime = 0;
final static long DOUBLE_CLICK_TIME = 500;
public boolean mouseDown(Event evt, int x, int y)
{
if((evt.when - lastDownTime)
A basic extension of the java.applet.Applet class
*/
import java.awt.*;
import java.lang.*;
import java.applet.*;
public class DoubleClickApplet extends Applet
{
String mouseClickedString = "Mouse event : none";
String mouseClickedString2 = "Mouse double click : no";
long lastDownTime = 0;
final static long DOUBLE_CLICK_TIME = 500;
public boolean mouseDown(Event evt, int x, int y)
{
if((evt.when - lastDownTime)