Important bits of the Main class:
Genster mechz = new Genster();
// ...
private class ClickListener implements ActionListener {
public void actionPerformed(ActionEvent e) {
if (e.getSource() == b_generate) {
if (basic.isSelected() == true); {
Genster.BasicG(); // to execute what would be in that method
t_generate.setText(/*what to put here?*/);
}
Genster class:
public class Genster {
public static void BasicG() {
String numbercool = "1337, it worked!";
//return numbercool;
// Without the void, NetBeans complains that I don't have a
// return type, although I have it here, currently commented. Returning numbercool
// would seem logical. :/
}
}
So, I'm a bit stumped here. I want to set the text of a text box to what my BasicG method in Genster processes. Right now, it just assigns numbercool to something I specify. I've tried all sorts of things like mechz.numbercool and mechz.BasicG(numbercool) Help please! :D