Thursday, February 11, 2016

Program to add TextArea in Frame.

import java.awt.*;
class txtArea extends Frame
{
public static void main(String args[ ])
{
TextArea ta1 =new TextArea("Area to write Text",5,30);
txtArea f1 =new txtArea();
f1.setTitle("Adding a TextArea in a Frame!!!");
f1.setLayout(new FlowLayout());
f1.add(ta1 );
f1.setSize(500,500);
f1.setVisible(true );
}
}
Output:

No comments:

Post a Comment