textfield tx1=new TextField( " ",35);
textfield tx2=new TextField( " ",35);
double x1=stringToDouble(tx1.getText());
double x2=stringToDouble(tx2.getText());
------解决方案--------------------
textfield tx1=new TextField( " ",35);
textfield tx2=new TextField( " ",35);
double x1=Double.valueOf(tx1.getText());
double x2=Double.valueOf(tx2.getText());
stringToDouble()这方法从哪来的?
------解决方案--------------------
除非你的这个类或你的基类中有这个方法,否则这样调用是不合法的,而且应该是static的才这样,不是的话,也应该super.stringToDouble();
------解决方案--------------------
不知道你的StringtoDouble是那里来的,但是我知道比较可以用 "== "和equals().