/** * Copyright (c): Uwe Schmidt, FH Wedel * * You may study, modify and distribute this source code * FOR NON-COMMERCIAL PURPOSES ONLY. * This copyright message has to remain unchanged. * * Note that this document is provided 'as is', * WITHOUT WARRANTY of any kind either expressed or implied. */ import java.applet.Applet; import java.awt.Frame; public class FrameApplet extends Applet { Frame f; int width = 400; int height = 300; public void init () { width = getIntParameter("frameWidth", width ); height = getIntParameter("frameHeight",height); f = new Frame("Frame Demo"); f.setSize(width,height); } public void start() { f.show(); f.validate(); } public void stop() { f.dispose(); } //-------------------- int getIntParameter(String param, int defaultValue) { int res = defaultValue; try { res = Integer.parseInt(getParameter(param)); } catch (Exception e) { } return res; } } //--------------------