import java.awt.*;
class Demo1_Label extends Frame
{
public static void main(String args[])
{
Label l1 =new Label(" Hello Java!!! ");
Demo1_Label f1 =new Demo1_Label();
f1.setTitle("Adding a Label in a Frame!!!");
f1.add(l1);
f1.resize(300,200);
f1.show( );
}
}
Output:
No comments:
Post a Comment