/* ==================================================== created by Isaac Tsai, 1997 randomized labeling of a figure applet Copyright (C) 1992-2000 Michigan State University The CAPA system is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation; either version 2 of the License, or (at your option) any later version. The CAPA system is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details. You should have received a copy of the GNU General Public License along with the CAPA system; see the file COPYING. If not, write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. As a special exception, you have permission to link this program with the TtH/TtM library and distribute executables, as long as you follow the requirements of the GNU GPL in regard to all of the software in the executable aside from TtH/TtM. */
< APPLET [CODEBASE = codebaseURL] CODE = appletFile [ALT = alternateText] [NAME = appletInstanceName] WIDTH = pixels HEIGHT = pixels [ALIGN = alignment] [VSPACE = pixels] [HSPACE = pixels] > [< PARAM NAME = appletParameter1 VALUE = value >] [< PARAM NAME = appletParameter2 VALUE = value >] . . . [alternateHTML] */ import java.applet.*; import java.awt.*; import java.lang.*; import java.util.*; import java.net.*; public class GLabel extends Applet implements Runnable { public int Xcord[]; public int Ycord[]; public String sLabel[]; public Image iImg[]; public int iX[]; public int iY[]; public int label_cnt; public int img_cnt; public int fsize; public int show_grid; public int grid_ww; public Image img; public Font f16; public void init() { int count, idx; String p, q; URL f_url=null; Xcord = new int[64]; Ycord = new int[64]; sLabel = new String[64]; iImg = new Image[64]; iX = new int[64]; iY = new int[64]; show_grid = 0; f16 = new Font("TimesRoman",Font.PLAIN,16); p=getParameter("COUNT"); label_cnt=(p==null)?1:Integer.valueOf(p).intValue(); for(idx=0;idx1)) { for(x1=0,y1=0,y2=apph;x1<=appw;x1=x1+grid_ww) { x2=x1; g.drawLine(x1,y1,x2,y2); } for(x1=0,y1=0,x2=appw;y1<=apph;y1=y1+grid_ww) { y2=y1; g.drawLine(x1,y1,x2,y2); } } } public void run() { } public void start() { } public void stop() { } }