mirror of
https://github.com/macocianradu/javaGUItoolkit.git
synced 2026-03-19 06:00:04 +00:00
bugs
added checkbox lists
This commit is contained in:
@@ -1,4 +1,6 @@
|
||||
import guiTree.Components.Button;
|
||||
import guiTree.Components.CheckBox;
|
||||
import guiTree.Components.ToggleButton;
|
||||
import guiTree.Window;
|
||||
import guiTree.events.MouseAdapter;
|
||||
import parser.XAMLParser;
|
||||
@@ -11,29 +13,31 @@ public class Main {
|
||||
Window window = XAMLParser.parse("ui.xml");
|
||||
assert window != null;
|
||||
|
||||
Button button1 = (Button)window.findByName("button1");
|
||||
button1.addMouseListener(new MouseAdapter() {
|
||||
@Override
|
||||
public void mouseClicked(MouseEvent mouseEvent) {
|
||||
System.out.println("Button x: " + button1.getLocationX() + " y: " + button1.getLocationY());
|
||||
}
|
||||
});
|
||||
|
||||
Button button2 = (Button)window.findByName("button2");
|
||||
button2.addMouseListener(new MouseAdapter() {
|
||||
@Override
|
||||
public void mouseClicked(MouseEvent mouseEvent) {
|
||||
System.out.println("Button x: " + button2.getLocationX() + " y: " + button2.getLocationY());
|
||||
}
|
||||
});
|
||||
|
||||
Button button4 = (Button)window.findByName("button4");
|
||||
button4.addMouseListener(new MouseAdapter() {
|
||||
@Override
|
||||
public void mouseClicked(MouseEvent mouseEvent) {
|
||||
System.out.println("Button x: " + button4.getLocationX() + " y: " + button4.getLocationY());
|
||||
}
|
||||
});
|
||||
// Button button1 = (Button)window.findByName("button1");
|
||||
// button1.addMouseListener(new MouseAdapter() {
|
||||
// @Override
|
||||
// public void mouseClicked(MouseEvent mouseEvent) {
|
||||
// System.out.println("Button x: " + button1.getLocationX() + " y: " + button1.getLocationY());
|
||||
// }
|
||||
// });
|
||||
//
|
||||
// ToggleButton button2 = (ToggleButton)window.findByName("button2");
|
||||
// button2.addMouseListener(new MouseAdapter() {
|
||||
// @Override
|
||||
// public void mouseClicked(MouseEvent mouseEvent) {
|
||||
// System.out.println("Button x: " + button2.getLocationX() + " y: " + button2.getLocationY());
|
||||
// }
|
||||
// });
|
||||
//
|
||||
// Button button4 = (Button)window.findByName("button4");
|
||||
// button4.addMouseListener(new MouseAdapter() {
|
||||
// @Override
|
||||
// public void mouseClicked(MouseEvent mouseEvent) {
|
||||
// System.out.println("Button x: " + button4.getLocationX() + " y: " + button4.getLocationY());
|
||||
// }
|
||||
// });
|
||||
CheckBox checkBox = (CheckBox)window.findByName("checkbox");
|
||||
window.repaint();
|
||||
}catch (Exception e){
|
||||
e.printStackTrace();
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user