Ok so I'm creating a Temperature Converter where Im trying to create a command based on the clicked radio button.
rdbtnFtoC is the radio button for converting from Fahrenheit to Celsius.
I want the code to be so that once this option is selected and the convert button is clicked, the value input by the user is converted using a formula.
I'm having trouble saying that if the radio button is selected then execute this code. I don't know if I can use the above if statement in the code,Code:public void actionPerformed(ActionEvent evt) {
System.out.println("btnConvert.actionPerformed, event="+evt);
//TODO add your code for btnConvert.actionPerformed
int val = [B]txtInsert.getY()[/B];
if(rdbtnFtoC.equals(true)){
val = ((val-32)*(5/9));
}
[B]lblResult.set(val); [/B]
And I'm also having trouble with txtInsert.get (integer) but there seems to be no option for integer :/ and outputting an integer (both in bold)
Help please?
