运行时候出现Exception in thread "main" java.lang.NullPointerException
at ch10.EmployeeDA.getAll<EmployeeDA.java:36>
at ch10.TestFrame.RefreshValues<TestFrame.java:384>
at ch10.TestFrame.<init><TestFrame.java:72>
at ch10.TestFrame.main<TestFrame.java:270>
以上对应的行代码分别为 aStatement=aConnection.createStatement();
EmployeeDA.getAll();
RefreshValues();
TestFrame frame=new TestFrame();
其中private void RefreshValues()
{
EmployeeDA.getAll();
Employee aEmployee=EmployeeDA.GetCurrentEmployee();
if(aEmployee!=null)
{
ShowEmployee(aEmployee);
}
else
{
clearTextField();
}
}