forked from badal74/java-codes
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathQuestion78.java
More file actions
15 lines (12 loc) · 497 Bytes
/
Copy pathQuestion78.java
File metadata and controls
15 lines (12 loc) · 497 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
import javax.swing.*;
public class Question78 {
public static void main(String args[]) {
JFrame f=new JFrame();//creating instance of JFrame
JButton b=new JButton("click");//creating instance of JButton
b.setBounds(130,100,100, 40);//x axis, y axis, width, height
f.add(b);//adding button in JFrame
f.setSize(400,500);//400 width and 500 height
f.setLayout(null);//using no layout managers
f.setVisible(true);//making the frame visible
}
}