当鼠标进入应用程序的窗口时,所调用的鼠标事件的方法是()
A: public void mouseEntered( MouseEvent )
B: public void mousePressed( MouseEvent )
C: public void mouseMoved( MouseEvent )
D: public void mouseExited( MouseEvent )
A: public void mouseEntered( MouseEvent )
B: public void mousePressed( MouseEvent )
C: public void mouseMoved( MouseEvent )
D: public void mouseExited( MouseEvent )
举一反三
- 分析下列程序,写出其功能。 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) {} }
- 下列______方法属于MouseMotionListener接口中的方法。 A: mouseExited(MouseEvent) B: mouseEntered(MouseEvent) C: mouseMoved(MouseEvent) D: mousePressed(MouseEvent)
- 当窗口被激活时,调用的窗口事件的方法是() A: Public void windowDeactivated ( WindowEvent ) B: Public void windowIconified( WindowEvent ) C: Public void windowActivated ( WindowEvent ) D: Public void windowOpened ( WindowEvent )
- 当窗口被激活时,调用的窗口事件的方法是()。 A: Public<br/>void windowDeactivated ( WindowEvent ) B: Public<br/>void windowOpened ( WindowEvent ) C: Public<br/>void windowIconified( WindowEvent ) D: Public<br/>void windowActivated ( WindowEvent )
- 【单选题】(A537f)当窗口被激活时,调用的窗口事件的方法是()。 A. public void windowDeactivated ( WindowEvent e); B. public void windowIconified( WindowEvent e); C. public void windowActivated ( WindowEvent e); D. public void windowOpened ( WindowEvent e);