已知类MyClass中事件MouseClicked定义如下: public delegate void mydelegate(); public event mydelegate MouseClicked(); 执行下列语句: Method obj=new Method(); MyClass e=new MyClass(); e. MouseClicked +=obj.fun; e. MouseClicked +=obj.fun; 其中Method类中包含事件处理方法fun,然后引发该MouseClicked 事件,其结果为【 】
已知类MyClass中事件MouseClicked定义如下: public delegate void mydelegate(); public event mydelegate MouseClicked(); 执行下列语句: Method obj=new Method(); MyClass e=new MyClass(); e. MouseClicked +=obj.fun; e. MouseClicked +=obj.fun; 其中Method类中包含事件处理方法fun,然后引发该MouseClicked 事件,其结果为【 】
下列选项中不属于MouseListener接口的方法是() A: mouseDragged B: mousePressed C: mouseClicked D: mouseEntered
下列选项中不属于MouseListener接口的方法是() A: mouseDragged B: mousePressed C: mouseClicked D: mouseEntered
在MouseListener中,负责处理鼠标进入组件操作的方法是( )。 A: mouseClicked B: mousePressed C: mouseEntered D: mouse
在MouseListener中,负责处理鼠标进入组件操作的方法是( )。 A: mouseClicked B: mousePressed C: mouseEntered D: mouse
处理鼠标事件时,通过方法将监-听-器绑定到事件源对象() A: mousePressed B: addMouseListener C: mouseEntered D: mouseClicked
处理鼠标事件时,通过方法将监-听-器绑定到事件源对象() A: mousePressed B: addMouseListener C: mouseEntered D: mouseClicked
当鼠标按键被按下时,将会触发鼠标按下事件,其对应的函数为( ) A: mousePressed() B: mouseClicked() C: mouseButtonPressed() D: mouseButtonClicked()
当鼠标按键被按下时,将会触发鼠标按下事件,其对应的函数为( ) A: mousePressed() B: mouseClicked() C: mouseButtonPressed() D: mouseButtonClicked()
下列方法中,没有定义在处理鼠标事件MouseEvent的监听器接口MouseListener中的方法是( )。 A: mouseClicked( ) B: mouseEntered( ) C: mouseReleased( ) D: mouseMoved( )
下列方法中,没有定义在处理鼠标事件MouseEvent的监听器接口MouseListener中的方法是( )。 A: mouseClicked( ) B: mouseEntered( ) C: mouseReleased( ) D: mouseMoved( )
1在组件上单击(按下鼠标并释放)时,会调用的鼠标处理方法是() A: mouseReleased(MouseEvente) B: mouseClicked(MouseEvent e) C: mouseEntered(MouseEvent e) D: mouseReleased(MouseEvente)
1在组件上单击(按下鼠标并释放)时,会调用的鼠标处理方法是() A: mouseReleased(MouseEvente) B: mouseClicked(MouseEvent e) C: mouseEntered(MouseEvent e) D: mouseReleased(MouseEvente)
在Java语言中,你的按钮要实现下面的功能: 当鼠标按下按钮时,显示"鼠标已按下";当释放按键时,显示"鼠标已释放"。你必须具体定义下列接口MouseListener的()方法。 A: mouseClicked B: mouseEntered C: mouseExited D: mousePressed E: mouseReleaseed
在Java语言中,你的按钮要实现下面的功能: 当鼠标按下按钮时,显示"鼠标已按下";当释放按键时,显示"鼠标已释放"。你必须具体定义下列接口MouseListener的()方法。 A: mouseClicked B: mouseEntered C: mouseExited D: mousePressed E: mouseReleaseed
分析下列程序,写出其功能。 import java.applet.*; import java.awt.*; import java.awt.event.*; public class Test extends Applet implements MouseListener { final int number = 5; int count = 0; Image[] card = new Image[number]; public void init() { setSize(1200,1000); addMouseListener(this); for (int i = 0; i < number; i++) { card[i] = getImage(getCodeBase(), i+".jpg"); } } public void paint(Graphics g) { if ((card[count]) != null) g.drawImage(card[count], 10,10,card[count].getWidth(this),card[count].getHeight(this), this); } public void mousePressed(MouseEvent e) { count = (count + 1) % number; repaint(); } public void mouseReleased(MouseEvent e) {} public void mouseEntered(MouseEvent e) {} public void mouseExited(MouseEvent e) {} public void mouseClicked(MouseEvent e) {} }
分析下列程序,写出其功能。 import java.applet.*; import java.awt.*; import java.awt.event.*; public class Test extends Applet implements MouseListener { final int number = 5; int count = 0; Image[] card = new Image[number]; public void init() { setSize(1200,1000); addMouseListener(this); for (int i = 0; i < number; i++) { card[i] = getImage(getCodeBase(), i+".jpg"); } } public void paint(Graphics g) { if ((card[count]) != null) g.drawImage(card[count], 10,10,card[count].getWidth(this),card[count].getHeight(this), this); } public void mousePressed(MouseEvent e) { count = (count + 1) % number; repaint(); } public void mouseReleased(MouseEvent e) {} public void mouseEntered(MouseEvent e) {} public void mouseExited(MouseEvent e) {} public void mouseClicked(MouseEvent e) {} }