1 package com.puppycrawl.tools.checkstyle; 6 7 import java.awt.event.MouseEvent ; 8 import java.awt.event.MouseAdapter ; 9 import javax.swing.JButton ; 10 11 15 public class InputScopeAnonInner 16 { 17 20 private JButton mButton = new JButton (); 21 22 25 private Runnable mRunnable = new Runnable () { 26 public void run() { 28 System.out.println("running"); 29 } 30 }; 31 32 35 InputScopeAnonInner() 36 { 37 mButton.addMouseListener( new MouseAdapter () 38 { 39 public void mouseClicked( MouseEvent aEv ) 40 { 41 System.out.println("click"); 42 } 43 } ); 44 } 45 46 49 public void addInputAnonInner() 50 { 51 mButton.addMouseListener( new MouseAdapter () 52 { 53 public void mouseClicked( MouseEvent aEv ) 54 { 55 System.out.println("click"); 56 } 57 } ); 58 } 59 } 60 | Popular Tags |