import java.awt.*;
class txtField extends Frame
{
public static void main(String args[])
{
TextField t1 =new TextField("Enter a value here!",50);
txtField f1 =new txtField();
f1.setTitle("Adding a TextField in a Frame!!!");
f1.add(t1);
f1.setSize(300,200);
f1.setVisible(true);
}
}
Output:
No comments:
Post a Comment