I've tried different things and I'm running out of ideas. I know it's probably something very simple that I'm overlooking. Here's the part that I think has problem in it. Whole program is kind of big too include (250 lines). This is where error comes from:
else {
// get input from TextField
int result;
int temperature = Integer.parseInt(input.getText().trim());
// get selected type of conversion and convert it
if (fahrenheit.getState() == true)
result = 5 * (temperature - 32) / 9;
if (celsius.getState() == true )
result = (9 * temperature / 5) + 32;
// format the output
output.setText(String.valueOf(result));
}