I simply want to select b1 with a mouse click and change b2 to random in actionPerformed but having problems with strange error message when I try to: //p1.b1.addActionListener(this); on MyJPanel2 I am not allowed to change anything in MyJPanel1. Exception in Main error
Hi everyone. Thanks for taking the time to read my post. I like messing around with computers or electronics and especially getting them attached to toys. So, I am looking for a platform to program with python. Ideally I would love to find an online emulator that allows me to practice my code on a pi device? If anyone could help me out it would be greatly appreciated.
Okay, I can fiy the formatting of code to this style no problem and seperate each if statement by a blank line. Thanks for the find there was wondering why it semi worked but I didn#t get an error. Thanks for the tips it will sink in with practice. This is the first I have heard about debug statements however. I don“t know how to display the value of a random unless I println it. Is that what you mean?
Hello, I want my program to listen to jl1 and read a random activity from b2 eachtime jl1 is pressed. For some reason each time I press jl1 nothing happens until the second time I press it then it always gives the same random response. I need some advice please.