Mercurial > hg > jslab
view src/samer/applet/ButtonsApplet.java @ 0:bf79fb79ee13
Initial Mercurial check in.
author | samer |
---|---|
date | Tue, 17 Jan 2012 17:50:20 +0000 |
parents | |
children |
line wrap: on
line source
/* * ButtonsApplet.java * * Copyright (c) 2000, Samer Abdallah, King's College London. * All rights reserved. * * This software is provided AS iS and WITHOUT ANY WARRANTY; * without even the implied warranty of MERCHANTABILITY or * FITNESS FOR A PARTICULAR PURPOSE. */ package samer.applet; import java.awt.*; public class ButtonsApplet extends JApplet { public void init() { super.init(); JAppletShell.instance.registerButtons(this); // set layout here String dir=getParameter("layout"); if ("vertical".equals(dir)) setLayout(new GridLayout(0,1,8,8)); else { String grid=getParameter("grid"); if ("true".equals(grid)) setLayout(new GridLayout(1,0,8,8)); else setLayout(new FlowLayout(FlowLayout.LEFT,4,4)); } } public void destroy() { JAppletShell.instance.deregisterButtons(this); super.destroy(); } }