//
// Cherry(目付け字) 2001/10/28 by ONOZATO Takehisa
//
//
//
import java.awt.*;
import java.applet.*;
import java.awt.event.*;
public class Cherry extends Applet implements ItemListener,ActionListener{
Image ofs; Graphics grf; //オフスクリーン
int aplWidth=500; int aplHeight=400; //アプレット
Color aplBG=new Color(255,239,223); //背景色
Image imgBack; //画像
String strBack="Cherry.gif";
Font fnt; String fntName; int fntStyle; //フォント
Checkbox chk[]=new Checkbox[5]; //チェックボックス
int chkLeft[]={410,410,410,410,410};
int chkTop[]={150,125,100,75,50};
boolean chkflg[]={false,false,false,false,false};
String chkCaption[]={"一の枝","二の枝","三の枝","四の枝","五の枝"};
int strLeft[]={430,430,430,430,430};
int strTop[]={150,125,100,75,50};
Button btn[]=new Button[2]; //ボタン
int btnLeft[]={410,410}; int btnTop[]={200,230};
String btnCaption[]={"答え","クリア"};
String btnAction[]={"0","1"};
int btnIndex=1;
int intAns;
String strAns[]={"わかりません","さ","く","ら","木","の","ふ","み",
"や","い","づ","れ","と","お","ぼ","ろ","げ","も","は","な",
"に","あ","り","し","を","か","ず","へ","て","ぞ","う","る"};
public void init() {
ofs=createImage(aplWidth,aplHeight); grf=ofs.getGraphics();
imgBack=getImage(getCodeBase(),strBack);
fnt=grf.getFont(); //フォント
fntName=fnt.getName(); fntStyle=fnt.getStyle();
grf.setFont(new Font(fntName,fntStyle,14));
for(int i=0; i