This one has me beaten. The code follows below.
I am creating a GUI, which contains a single checkbox (more soon) and a
All I am trying to do at this stage is:
- Create a GUI with checkbox - DONE
- Put a tick in the box & click go - DONE
- After licking go, I want to test if the checkbox is selected and if
it, output “Box was ticked” - this just does not happen
Can anyone perhaps spot the stupid mistake I am making?
panel = Js::JPanel.new
panel.setLayout GridLayout.new 10, 2
eCheckBox = Js::JCheckBox.new
elbl = Js::JLabel.new(“Everything");
goButton = Js::JButton.new(“Run”)
frame = Js::JFrame.new()
goButton.addActionListener do |e|
puts “Box was ticked"