标签:也会 ber button container padding 一个 plain pac lambda
1
|
|
1
2
3
4
5
|
button.addActionListener( new ActionListener(){ public void actionPerformed(ActionEvent ae){ System.out.println( "Actiondetected" ); } }); |
1
2
3
|
button.addActionListener(()->{ System.out.println( "Actiondetected" ); }); |
1
2
3
4
5
6
|
Runnable runnable1= new Runnable(){ @Override public void run(){ System.out.println( "RunningwithoutLambda" ); } }; |
1
2
3
|
Runnable runnable2=()->{ System.out.println( "RunningfromLambda" ); }; |
标签:也会 ber button container padding 一个 plain pac lambda
原文地址:http://www.cnblogs.com/panxuejun/p/7616918.html