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 16 public class InputAnonInnerLength 17 { 18 21 private JButton mButton = new JButton (); 22 23 private class MyInner 24 { 25 private MyInner(int[] anArray) 26 { 27 } 28 } 29 30 35 private MyInner myInner = new MyInner(new int[]{ 36 1, 38 2, 39 3, 40 4, 41 5, 42 6, 43 7, 44 } 45 ); 46 47 50 private Runnable mRunnable1 = new Runnable () { 51 public void run() { 53 System.out.println("running"); 54 System.out.println("running"); 55 System.out.println("running"); 56 System.out.println("running"); 57 System.out.println("running"); 58 System.out.println("running"); 59 System.out.println("running"); 60 System.out.println("running"); 61 System.out.println("running"); 62 System.out.println("running"); 63 System.out.println("running"); 64 System.out.println("running"); 65 System.out.println("running"); 66 System.out.println("running"); 67 System.out.println("running"); 68 System.out.println("running"); 69 } 70 }; 71 72 75 private Runnable mRunnable2 = new Runnable () { 76 public void run() { 78 System.out.println("running"); 79 System.out.println("running"); 80 System.out.println("running"); 81 System.out.println("running"); 82 System.out.println("running"); 83 System.out.println("running"); 84 System.out.println("running"); 85 System.out.println("running"); 86 System.out.println("running"); 87 System.out.println("running"); 88 System.out.println("running"); 89 System.out.println("running"); 90 System.out.println("running"); 91 System.out.println("running"); 92 System.out.println("running"); 93 } 94 }; 95 96 99 InputAnonInnerLength() 100 { 101 mButton.addMouseListener( new MouseAdapter () 102 { 103 public void mouseClicked( MouseEvent aEv ) 104 { 105 System.out.println("click"); 106 } 107 } ); 108 } 109 110 113 public void addInputAnonInner() 114 { 115 mButton.addMouseListener( new MouseAdapter () 116 { 117 public void mouseClicked( MouseEvent aEv ) 118 { 119 System.out.println("click"); 120 } 121 } ); 122 } 123 } 124 | Popular Tags |