Java Applet Text Field

import java.awt.*;
import javax.swing.*;
/*
    <applet code="TextField" width=300 height=50>
    </applet>
*/
public class textfield extends JApplet
{
    JTextField j;
    public void init()
    {
        Container contentPane=getContentPane();
        contentPane.setLayout(new FlowLayout());
        j=new JTextField(15);
        contentPane.add(j);
    }
}

Top