• 2022-06-06 问题

    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)

  • 2022-07-23 问题

    当鼠标按键被释放时,会调用以下哪个事件处理器方法?() A: mouseReleased() B: mouseUp() C: mouseOff() D: mouseLetGo()

    当鼠标按键被释放时,会调用以下哪个事件处理器方法?() A: mouseReleased() B: mouseUp() C: mouseOff() D: mouseLetGo()

  • 2022-06-16 问题

    在Java事件处理模型中,当按下鼠标按钮时,处理()事件。 A: mouseReleased B: mouseExited C: mousePressed D: mouseDown

    在Java事件处理模型中,当按下鼠标按钮时,处理()事件。 A: mouseReleased B: mouseExited C: mousePressed D: mouseDown

  • 2022-06-07 问题

    下列方法中,没有定义在处理鼠标事件MouseEvent的监听器接口MouseListener中的方法是( )。 A: mouseClicked( ) B: mouseEntered( ) C: mouseReleased( ) D: mouseMoved( )

    下列方法中,没有定义在处理鼠标事件MouseEvent的监听器接口MouseListener中的方法是( )。 A: mouseClicked( ) B: mouseEntered( ) C: mouseReleased( ) D: mouseMoved( )

  • 2021-04-14 问题

    分析下列程序,写出其功能。 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) {} }

  • 1