[問題] java applet問題
我寫了一個介面程式勾選一些選項後,會產生出一個檔案
然後call另外一個程式去讀這個檔案,也是會跑出一個介面的
但是run的時候都沒什麼錯誤,可是第二個視窗出不來0.0
請問是哪邊出了問題呢?
A.java
Import ....
Import B;
public class Interface extends JFrame implements ActionListener
{
Interface()
{
一些介面的code..
}
public void actionPerformed(ActionEvent arg0)
{
new a();
}
class a
{
a()
{
產生檔案,檔案路徑為path
GraphView GV = new GraphView();
GV.init(path);
}
}
}
B.java
public class GraphView extends JPrefuseApplet
{
public void init(String fpath)
{
UILib.setPlatformLookAndFeel();
JComponent graphview = demo(fpath, "name");
this.getContentPane().add(graphview);
}
}
/////
如果我把B的fpath直接寫死,弄某個可讀的檔案路徑,只執行B是有東西(視窗)跑出來的
雖然我用call的主控台訊息也沒有顯示什麼錯誤,顯示的東西跟正常啟動是一樣的
請問我是哪裡漏了什麼嗎?
(程式很長,用個大概說明,B程式是網路上免費使用的程式)
--
※ 發信站: 批踢踢實業坊(ptt.cc)
◆ From: 163.14.72.39
→
12/07 15:18, , 1F
12/07 15:18, 1F
→
12/07 15:21, , 2F
12/07 15:21, 2F
→
12/07 15:23, , 3F
12/07 15:23, 3F
→
12/07 15:26, , 4F
12/07 15:26, 4F
→
12/07 15:32, , 5F
12/07 15:32, 5F
討論串 (同標題文章)
完整討論串 (本文為第 2 之 2 篇):