SWING
Develop a program using label (swing) to display message “Welcome to java”;
import java.awt.*;
class L {
L() {
Frame f = new Frame();
Label l1 = new Label("Welcome to Java");
l1.setBounds(100, 50, 120, 80);
f.add(l1);
f.setSize(500, 500);
f.setLayout(null);
f.setVisible(true);
}
public static void main(String a[]) {
new L();
}
}
output;
No comments:
Post a Comment