-2

i am new learner of java i want to create one application program in applet. i want to create
"applet which has a Text Field to accept a URL string, and displays the document of the URL string in a new browser window."

Thanks in advance.

@nimit parekh

Nimit Parekh
  • 16,776
  • 8
  • 50
  • 72

2 Answers2

1

this post contains answer to your question:

Getting java gui to open a webpage in web browser

Community
  • 1
  • 1
AlexR
  • 114,158
  • 16
  • 130
  • 208
0

From inside your applet class (which must extend java.awt.Applet or javax.swing.JApplet):

getAppletContext().showDocument(new URL("http://www.google.com"));
Sami Koivu
  • 3,640
  • 3
  • 24
  • 23