List of usage examples for java.applet AppletContext showDocument
public void showDocument(URL url, String target);
From source file:MainClass.java
public void paint(Graphics g) { AppletContext ac = getAppletContext(); try {/*from w w w . j av a 2s. c o m*/ URL url = new URL("http://www.java2s.com"); ac.showDocument(url, "frame2"); } catch (Exception e) { showStatus("Exception: " + e); } g.drawString("ShowDocument Applet", 10, 25); }
From source file:org.openehealth.coms.cc.consent_applet.applet.ConsentApplet.java
/** * Opens a new window and shows the current consent as a PDF within * //from www .jav a 2 s . c om */ private void requestConsentPDF() { try { AppletContext a = getAppletContext(); URL url = new URL( strRelURL + "/" + privilegedServlet + "CreateConsentServiceServlet?type=newconsentpdf"); a.showDocument(url, "_blank"); } catch (MalformedURLException e) { System.out.println(e.getMessage()); } }