Okay cool, thanks. I felt like I was using the wrong one but I think I'm good.
I can access the getMethods() method but I can't figure out how to communicate back to the main loop. This is pretty much what I'm working with:
public class GUI extends JFrame {
private JPanel panel;
// other GUI objects
// I passed the Bot object from the main loop (which I assumed you meant)
public GUI(Bot b) {
setDefaultCloseOperation(EXIT_ON_CLOSE);
// more GUI stuff
// b.getMethods()...
}
}
I guess I could work from there and stay inside the GUI class but that doesn't feel right... So how could I send, for example, a checkbox's isSelected() value back to the onStart() method? Like:
private boolean VARIABLE1;
@Override
public void onStart() {
GUI g = new GUI(getBot());
g.setVisible(true);
while(g.isVisible()) {} // I've heard about this style of waiting being bad, but this was the only one I tried that just worked.
VARIABLE1 = g.checkbox.isSelected(); // This is what I was getting at, I don't know if this would even be the best way to go about it.
}
I think that's the best way I can describe it, but I can't figure out how to implement that specific functionality.