[問題] applet showDocument

看板java作者 (@______@)時間18年前 (2006/08/17 21:08), 編輯推噓0(000)
留言0則, 0人參與, 最新討論串1/1
最近在寫applet的東西 用到這個method getAppletContext().showDocument() 不過說也奇怪... 參考以下範例 class A extends JApplet{ .... public void fun1(){ try{ getAppletContext().showDocument(new URL("i am URL")) } catch(IOException){ System.out.println("I am IOException"); } } public void fun2(){ //call other class(maybe class B) with same method implementation about fun1 //但是這個函式在showDocument的時候卻不能用 } } -- 得到以下結論... getAppletContext().showDocument() 這個只能用在applet這個tag 裡面的code 所放的 class 裡面.. 搞不透..有大大有相關方面的解釋嗎..thx -- ※ 發信站: 批踢踢實業坊(ptt.cc) ◆ From: 220.143.224.228
文章代碼(AID): #14v6fJ6h (java)