anotherTest.java
1 |
|
2 |
import java.lang.reflect.Method; |
3 |
public class anotherTest { |
4 |
public anotherTest() { |
5 |
Window window = new Window("anotherTest.java"); |
6 |
JButton button = new JButton(); // Yeah, have to initialize that, because Java. |
7 |
button = window.createButton("Knopje!!", "???", "printSomething", this); |
8 |
try { |
9 |
Thread.sleep(1000); |
10 |
} catch (InterruptedException e){ |
11 |
e.printStackTrace(); |
12 |
} |
13 |
button.setText("LOL"); |
14 |
System.out.println("Done."); |
15 |
String[] list = {"lala"}; |
16 |
window.createRadioButtons(list); |
17 |
|
18 |
System.out.println("Okay, that worked..."); |
19 |
try { |
20 |
Thread.sleep(1000); |
21 |
} catch (InterruptedException e){ |
22 |
e.printStackTrace(); |
23 |
} |
24 |
window.removeComponent(button); |
25 |
} |
26 |
|
27 |
public void printSomething() { |
28 |
System.out.println("Okay, I can print stuff."); |
29 |
} |
30 |
} |
31 |