【问题标题】:i want to create the program of the java when enter the link of the website and that link open in to browser我想在输入网站链接并且该链接在浏览器中打开时创建java程序
【发布时间】:2011-05-21 10:37:15
【问题描述】:

我是 java 的新手,我想在 applet 中创建一个应用程序。我要创作
"有一个文本字段来接受 URL 字符串的小程序,并在新的浏览器窗口中显示 URL 字符串的文档。"

提前致谢。

@nimit parekh

【问题讨论】:

    标签: java applet


    【解决方案1】:

    从您的小程序类内部(必须扩展 java.awt.Applet 或 javax.swing.JApplet):

    getAppletContext().showDocument(new URL("http://www.google.com"));
    

    【讨论】:

      【解决方案2】:

      这篇文章包含对您问题的回答:

      Getting java gui to open a webpage in web browser

      【讨论】:

        猜你喜欢
        • 2016-06-06
        • 1970-01-01
        • 2020-01-30
        • 2012-02-21
        • 2014-07-22
        • 1970-01-01
        • 2011-06-14
        • 1970-01-01
        • 1970-01-01
        相关资源
        最近更新 更多