Results 1 to 1 of 1
-
Applet - enter URL and view the page
The applet below gets the URL in a textfield and displays it.
Java Code:public class GotoURLButton extends Applet implements ActionListener { Button b; TextField t; public void init() { t = new TextField(20); t.setText("http://www.google.com"); add(t); b = new Button("Go to this URL"); add(b); b.addActionListener(this); } public void actionPerformed(ActionEvent ae) { if (ae.getSource() == b) { try { getAppletContext().showDocument(new URL(t.getText())); } catch (Exception e) { e.printStackTrace(); } } } }
Similar Threads
-
Launching Applet from a JSP page
By Java Tip in forum Java TipReplies: 0Last Post: 01-31-2008, 12:53 PM -
Unable to view japanese in java applet
By rogermakrm in forum Java AppletsReplies: 5Last Post: 01-16-2008, 06:07 AM -
How to view applet from html page.
By jwzumwalt in forum Java AppletsReplies: 2Last Post: 11-24-2007, 04:21 AM -
redirect page within a java applet
By paul in forum Java AppletsReplies: 1Last Post: 08-07-2007, 05:11 AM -
Create a Applet in the page HTML
By Daniel in forum Java AppletsReplies: 2Last Post: 07-04-2007, 07:52 AM


LinkBack URL
About LinkBacks
Reply With Quote
Bookmarks