PDA

View Full Version : Whats wrong with this Java code???


Bob
10-11-2007, 03:27 PM
else if (e.getSource() == b1)
{
while(e.getSource() == b1)
{
quantity1++;
}
TextArea1.setText("Egg");
TextArea2.setText("1");
TextArea3.setText("$5.00");
Price =55.00;
Total = price*quantity1;
TextField.setText(TextField.getText() + "\n EGG\t1 55.00");

There were no errors during compilation. There were no errors when I ran it. But whenever I press the button the whole program just freezes......
@rahul Changing when to while just add error during compilation........