/*********************************** Javaアプレット  テキストボックスとラベルの表示 ************************************/ import java.applet.*; import java.awt.*; public class Applet_Textbox extends Applet { TextField txt1; // テキストボックス用の変数 Label title,label; // ラベル用の変数 public void init() { title=new Label("ゲームを始めます"); title.setBackground(Color.green); // 背景色 title.setForeground(Color.red); // 文字色 this.add(title); label=new Label("数字(1-3)を入れて下さい"); this.add(label); txt1=new TextField(10); this.add(txt1); } }