Friday, 24 January 2014

Simple Create a Frame using JAVA

import java.awt.*;

class frameDemo extends Frame
{
    Button b = new Button("Click Me!");
    
    frameDemo()
    {
        setVisible(true);
        setSize(400,400);
        setTitle("My First App");
        setLayout(new FlowLayout());
        add(b);
    }
    
    public static void main(String[] s)
    {
        new frameDemo();      
    } 
}


OUTPUT


0 comments:

Post a Comment

Followers