File tree Expand file tree Collapse file tree 4 files changed +28
-2
lines changed
net.sf.j2s.core/dist/swingjs
net.sf.j2s.java.core/src/test Expand file tree Collapse file tree 4 files changed +28
-2
lines changed Original file line number Diff line number Diff line change 1- 20200807063741
1+ 20200811045955
Original file line number Diff line number Diff line change 1- 20200807063741
1+ 20200811045955
Original file line number Diff line number Diff line change 11package test ;
22
3+
34import static java .awt .Color .getColor ;
45import static java .awt .Toolkit .getDefaultToolkit ;
56
2526;
2627class Test_Class extends Test_Class2 <Integer > {
2728
29+ static class TestStatic {
30+
31+ static String sayHello () { return "Hello there" ; }
32+ }
33+
34+
35+
36+
37+
2838 public int test_int = 3 ; // shadows Test_
2939
3040
@@ -324,6 +334,10 @@ public static String localtest() {
324334
325335 public static void main (String [] args ) {
326336
337+ TestStatic ts = null ;
338+
339+ System .out .println (ts .sayHello ());
340+
327341// System.out.println(new Date() + " " + Date.parse("3/4/2020"));
328342
329343 System .out .println (Number .class .isAssignableFrom (Double .class ));
Original file line number Diff line number Diff line change 55import java .awt .EventQueue ;
66import java .awt .Font ;
77import java .awt .GridLayout ;
8+ import java .awt .Toolkit ;
89import java .awt .event .ActionEvent ;
910import java .awt .event .ActionListener ;
1011import java .util .Date ;
@@ -157,6 +158,17 @@ public void actionPerformed(ActionEvent e) {
157158
158159 });
159160
161+ m .add (btn , null );
162+ btn = new JButton ("paste" );
163+ btn .addActionListener (new ActionListener () {
164+
165+ @ Override
166+ public void actionPerformed (ActionEvent e ) {
167+ Object data = Toolkit .getDefaultToolkit ().getSystemClipboard ().getContents (null );
168+ System .out .println (data );
169+ }
170+
171+ });
160172 m .add (btn , null );
161173 add (m , BorderLayout .SOUTH );
162174
You can’t perform that action at this time.
0 commit comments