Código:
import java.applet.Applet; import java.awt.*; public class CADENAS extends Applet //implements ActionListener { private TextField str1, str2, rest, union; private Label lbl1, lbl2; private Button Compara; private Panel board; public void init() { lbl1 = new Label("Cadena 1: "); lbl2 = new Label("Cadena 2: "); str1 = new TextField(10); str2 = new TextField(10); rest = new TextField(10); union = new TextField(20); Compara = new Button("Procesar"); board = new Panel(); board.setLayout(new GridLayout(5,2,6,6)); board.add(lbl1); board.add(str1); board.add(lbl2); board.add(str2); board.add(Compara); } }