List of usage examples for java.awt.event MouseAdapter MouseAdapter
MouseAdapter
From source file:Main.java
public Main() { addMouseListener(new MouseAdapter() { public void mouseClicked(MouseEvent me) { System.out.println(me); }//from w w w . j ava 2 s . c om }); }
From source file:Main.java
public Main() { addMouseListener(new MouseAdapter() { public void mouseWheelMoved(MouseEvent me) { System.out.println(me); }/*from ww w . j av a 2 s . c om*/ }); }
From source file:Main.java
public Main() { addMouseListener(new MouseAdapter() { public void mousePressed(MouseEvent me) { System.out.println(me); }/*from ww w. j av a 2 s. c o m*/ }); }
From source file:Main.java
public Main() { addMouseListener(new MouseAdapter() { public void mouseDragged(MouseEvent me) { System.out.println(me); }//from ww w . j a v a2 s .com }); }
From source file:Main.java
public Main() { addMouseListener(new MouseAdapter() { public void mouseExited(MouseEvent me) { System.out.println(me); }//from ww w . j a va2 s . co m }); }
From source file:MainClass.java
public MainClass() { addMouseListener(new MouseAdapter() { public void mousePressed(MouseEvent me) { System.out.println(me); }//from www . j a v a 2s .c om }); }
From source file:MainClass.java
public MainClass() { setLayout(null);// w w w .jav a2 s . com add(button); button.setSize(button.getPreferredSize()); button.setLocation(20, 20); addMouseListener(new MouseAdapter() { public void mousePressed(MouseEvent e) { button.setLocation(e.getX(), e.getY()); } }); }
From source file:MyLabel.java
public MyLabel(String msg) { super(msg);/* w ww . jav a2 s.c o m*/ addMouseListener(new MouseAdapter() { public void mouseClicked(MouseEvent me) { fireActionPerformed(new ActionEvent(MyLabel.this, ActionEvent.ACTION_PERFORMED, "SecretMessage")); } }); }
From source file:MainClass.java
public MainClass() { addMouseListener(new MouseAdapter() { public void mouseReleased(MouseEvent me) { int w = (d.width + inc) > max ? min : (d.width + inc); int h = (d.height + inc) > max ? min : (d.height + inc); setSize(new Dimension(w, h)); }/*from w w w. j a v a 2 s .co m*/ }); }
From source file:Main.java
public Main() { setLayout(null);//from w w w . ja va 2 s.c o m add(button); button.setSize(button.getPreferredSize()); button.setLocation(20, 20); addMouseListener(new MouseAdapter() { public void mousePressed(MouseEvent e) { System.out.println(e.getButton() == MouseEvent.BUTTON1); } }); }