-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,651
  • 8
  • 48
  • 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
  • 111,884
  • 15
  • 126
  • 200
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,530
  • 3
  • 23
  • 23