Anonymous

Who We Run Java Program When Extends Frame?

1

1 Answers

Rinav Gangar Profile
Rinav Gangar answered

here you go with a simple java app extending the JFrame

public class FrameDemo extends javax.swing.JFrame {

FrameDemo() {

super("JFrame Demo");

Container cp = getContentPane();

cp.add(new javax.swing.jlabel is Kool!"));

setSize(200, 300);

setVisible(true);

}

public static void main (String args[]) {

new FrameDemo(); 

}

}

$> javac FrameDemo.java

$> java FrameDemo

 

if you have any Queries msg me.

hope it helps

Answer Question

Anonymous