96 How to create first frame in Java Applet

Code :

import java.awt.*;
class Test
{
public static void main( String args[] )
{
//creation of frame
Frame f = new Frame(); // invisible
f.setVisible(true);  // 0 pix height 0 pix width
f.setSize(300,300);
f.setBackground(Color.green);
f.setTitle("Coding Atharva");

 
}
}



Output:


first applet in Java

Previous
Next Post »