Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- import javax.swing.JButton;
- import javax.swing.JFrame;
- import javax.swing.JLabel;
- public class Main {
- public static void main(String[] args) {
- JFrame frame = new JFrame("Frame");
- JButton button = new JButton("Click me!");
- JLabel label = new JLabel("Hello!");
- frame.setSize(500, 200);
- button.setBounds(100, 100, 250, 50);
- frame.add(button);
- //frame.add(label);
- frame.setVisible(true);
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment