public class Operations implements ActionListener
{
public void actionPerformed(ActionEvent e)
{
String str = result.getText();
store = Float.parseFloat(str);
result.setText(null);
opCode = Integer.parseInt(e.getActionCommand());
}
}حيث result مربع نص و store و opCode متغيران .
المشكلة في هذا السطر :
store = Float.parseFloat(str);
حيث أن ال str توضع فيه القيم الصحيحة فعلا .
ولكن عند تشغيل الإبليت لا ينتقل إلى الأمر الذي يمسح محتويات مربع النص .
وهذا معناه أن المشكلة في السطر الذي ذكرته .
ولكن ما الخطأ بالضبط لا أدري .
مع ملاحظة أنه لا خطأ عن ال compile .
