Re: radio button

so i ended up using a toggle and when it is selected it set the text of a hidden label to -1 and within my equation i had handsign = .getText() of that label. the label is originally 1 and changes when toggle is pressed and changes back if it is released. not professional way of doing things but its going to have to work. thanks for all you help guys. sorry i couldnt follow your directions and do it the way you suggested. i guess that was beyond my knowledge of java at this point.

Re: radio button

Originally Posted by gbonecapone

so i ended up using a toggle and when it is selected it set the text of a hidden label to -1 and within my equation i had handsign = .getText() of that label. the label is originally 1 and changes when toggle is pressed and changes back if it is released. not professional way of doing things but its going to have to work. thanks for all you help guys. sorry i couldnt follow your directions and do it the way you suggested. i guess that was beyond my knowledge of java at this point.

Sounds like it shouldn't be too hard to take that code and convert it to something more like what I'm talking about. Instead of getting the text of the hidden text box, why not create that String based on whether the JRadioButton is selected?

Re: radio button

thats what i tried but i for some reason couldnt carry that variable out of the actionperformed to save my life. it would change it and print it out to show me but wouldnt transfer to the equation where the rest of the variable were. i probably did something wrong but its not a big deal ill just keep it like this even though its unprofessional.