看板 java 關於我們 聯絡資訊
目前程式寫到這邊卡關了 http://ppt.cc/Xz@B 這是目前的程式 現在卡在要把檔案選所選的資料夾的檔案 在左邊的JList中列出來 但是現在雖然可以成功compile 但是卻出現 Exception in thread "main" java.lang.NullPointerException at testve.getJList_left(testve.java:364) at testve.getJScrollPane_ld(testve.java:414) at testve.getJPanel_left(testve.java:287) at testve.getJContentPane(testve.java:230) at testve.initialize(testve.java:187) at testve.<init>(testve.java:103) at testve.main(testve.java:528) 是說我沒有指定目錄給 aryFile1,那 aryFile1 當然沒辦法執行 list() 方法。 但是在程式片段中我有key File aryFile1 = fcObj.getCurrentDirectory(); 試了好久還是弄不出來 請有經驗的前輩可以幫我找出問題嗎?? 謝謝 -- ※ 發信站: 批踢踢實業坊(ptt.cc) ◆ From: 218.172.243.70