I’m trying to program my first GUI-class in Java, using the Window Builder. Ok, the GUI is ready but has no functions yet (it contains 10 checkboxes (yes, they are all neccessary) and 2 buttons and a JTextField, so nothing special). So I just drag’n’dropped the checkboxes and button into the window, I haven’t coded anything yet.
I have two classes:
GUI.java -> only for the layout
Main.java -> should get ‘inputs’ from GUI.java
Now the user should check or uncheck the checkboxes and then finally press a button.
But how do I ‘read out’ if a checkbox is checked or not – I have two classes?
I have to add that I’m a beginner to Java and especially to GUI-programming, but I just want to learn it. I would be happy to receive some help but NOT the complete code.
I know you said you didn’t want the full, code but this isn’t really it, just a very basic working demo of what you want to do
Gui.java
Main.java
}