簡體   English   中英

從JApplet獲取JFrame

[英]Obtaining a JFrame from a JApplet

給定一個JApplet,我如何獲得與此小應用程序對應的JFrame對象?

JApplet applet = this;
JRootPane rootPane = getRootPane();
Container contentPane = getContentPane();
JFrame jframe = ...; // How do I obtain the JFrame?

您可以從Applet創建新的JFrame。 但是,沒有像Apple JFrame這樣的容器圍繞着Applet。 Applet 該容器。

暫無
暫無

聲明:本站的技術帖子網頁,遵循CC BY-SA 4.0協議,如果您需要轉載,請注明本站網址或者原文地址。任何問題請咨詢:yoyou2525@163.com.

 
粵ICP備18138465號  © 2020-2024 STACKOOM.COM