mirror of
https://github.com/macocianradu/javaGUItoolkit.git
synced 2026-03-19 06:00:04 +00:00
added working click listener
This commit is contained in:
@@ -1,3 +1,4 @@
|
||||
import guiTree.Button;
|
||||
import guiTree.Window;
|
||||
import parser.XAMLParser;
|
||||
|
||||
@@ -7,14 +8,16 @@ import java.awt.event.WindowEvent;
|
||||
public class Main {
|
||||
public static void main(String[] args) {
|
||||
try{
|
||||
Window window = XAMLParser.parse("company.xml");
|
||||
Window window = XAMLParser.parse("ui.xml");
|
||||
assert window != null;
|
||||
Button button = (Button)window.findByName("button1");
|
||||
window.addWindowListener(new WindowAdapter() {
|
||||
@Override
|
||||
public void windowClosing(WindowEvent e) {
|
||||
window.dispose();
|
||||
}
|
||||
});
|
||||
|
||||
}catch (Exception e){
|
||||
e.printStackTrace();
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user