这是SSCCEE
java.lang.NullPointerException
at PotterMCSR.test(PotterMCSR.java:1786)
at PotterMCSR.jbInit(PotterMCSR.java:452)
at PotterMCSR.<init>(PotterMCSR.java:448)
at PotterMCSR$1.run(PotterMCSR.java:343)
at java.awt.event.InvocationEvent.dispatch(Unknown Source)
at java.awt.EventQueue.dispatchEventImpl(Unknown Source)
at java.awt.EventQueue.access$500(Unknown Source)
at java.awt.EventQueue$3.run(Unknown Source)
at java.awt.EventQueue$3.run(Unknown Source)
at java.security.AccessController.doPrivileged(Native Method)
at java.security.ProtectionDomain$1.doIntersectionPrivilege(Unknown Source)
at java.awt.EventQueue.dispatchEvent(Unknown Source)
at java.awt.EventDispatchThread.pumpOneEventForFilters(Unknown Source)
at java.awt.EventDispatchThread.pumpEventsForFilter(Unknown Source)
at java.awt.EventDispatchThread.pumpEventsForHierarchy(Unknown Source)
at java.awt.EventDispatchThread.pumpEvents(Unknown Source)
at java.awt.EventDispatchThread.pumpEvents(Unknown Source)
at java.awt.EventDispatchThread.run(Unknown Source)
我尝试使用getValue()从对象解析double,以便从不同的文本字段添加一堆值,并将该总计发送到不同的文本字段。我认为这是因为当它试图解析getValue()时它是null。
protected void do_ftfIncomeSalary_propertyChange(PropertyChangeEvent arg0) {
Double salary = ((double)((ftfIncomeSalary.getValue())));
Double CurrTotalIncome = ((double)((ftfTotalIncome.getValue())));
Double totalIncome= salary+CurrTotalIncome;
ftfIncomeSalary.setValue(totalIncome);
}