public SVGApplet() { setBackground(Color.WHITE); start = System.currentTimeMillis(); setName("JHotDraw SVG Applet " + getClass().getPackage().getImplementationVersion()); ((JComponent) getContentPane()) .setBorder(new MatteBorder(new Insets(1, 1, 1, 1), new Color(0xa5a5a5))); // ResourceBundleUtil.setVerbose(true); }
/** * Closes the applet. This method can be implemented by invoking <code> * getAppletContext().showDocument(...)</code>. */ protected void close() { AppletContext appletContext; try { appletContext = getAppletContext(); } catch (Throwable e) { appletContext = null; } if (appletContext == null) { System.exit(0); } else { getContentPane().removeAll(); ((JComponent) getContentPane()).revalidate(); try { appletContext.showDocument(new URL(getDocumentBase(), getParameter("PageURL"))); } catch (MalformedURLException ex) { ex.printStackTrace(); } } }