Text fields are objects belonging to the class JTextField. Therefore, you can create a text field by declaring a reference variable of the type JTextField followed by an instantiation of the object. Some methods of the class JTextField are:
public JTextField(String str)
public JTextField(String str, int columns)
public void setLayout(String str)
public String getText()
public void setEditable(Boolean b)
public void addActionListener(ActionListener obj)
No comments:
Post a Comment