AppletContext: showDocument(URL url,String target) : AppletContext : java.applet : Java by API examples (example source code) Organized by topic

Java by API
C++
PHP
Java by API Home »  java.applet   » [  AppletContext  ]   
 



AppletContext: showDocument(URL url,String target)

import java.applet.AppletContext;
import java.awt.Graphics;
import java.net.URL;

import javax.swing.JApplet;

public class MainClass extends JApplet {

  public void paint(Graphics g) {
    AppletContext ac = getAppletContext();
    try {
      URL url = new URL("http://www.java2s.com");
      ac.showDocument(url, "frame2");
    catch (Exception e) {
      showStatus("Exception: " + e);
    }
    g.drawString("ShowDocument Applet"1025);
  }
}



           
       
Related examples in the same category
1.  implements AppletContext
























Home| Contact Us
Copyright 2003 - 04 Demo Source and Support. All rights reserved.
All other trademarks are property of their respective owners.