i am working on making a scientific calculator in netbeans using wing components and i used combo box for conversion purpose but the handler code i wrote isnt working for all conversion, it only works for the 1st item.
and please help me with "action" and "item" on the right click of event option in netbeans.
my code is
a = Double.valueOf(String.valueOf(display.getText()));
if(jComboBox1.getSelectedItem().equals("Convert TIME ( Minutes to Seconds)"))
{
double b;
b = a*60;
display.setText( ""+ b);
display.setBackground(Color.blue);
}
if(jComboBox1.getSelectedItem().equals("Convert TIME (Seconds to Minutes"))
{
double x;
x = a/60;
display.setText( ""+ x);
display.setBackground(Color.red);
}
this code is under the action option i.e events-> action and in that method i wrote this code please do help me so that i could write the whole code for all conversions
plz reply ASAP....