Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- package project1;
- import java.awt.Dimension;
- import java.awt.Rectangle;
- import javax.swing.JButton;
- import javax.swing.JFrame;
- public class Frame1 extends JFrame {
- private JButton Boton1 = new JButton();
- private JButton Boton2 = new JButton();
- public Frame1() {
- try {
- Initialize();
- } catch (Exception e) {
- e.printStackTrace();
- }
- }
- private void Initialize() throws Exception {
- this.getContentPane().setLayout( null );
- this.setSize(new Dimension(430, 344));
- Boton1.setText("Boton1");
- Boton1.setBounds(new Rectangle(70, 75, 71, 23));
- Boton2.setText("Boton2");
- Boton2.setBounds(new Rectangle(100, 65, 71, 23));
- this.getContentPane().add(Boton2, null);
- this.getContentPane().add(Boton1, null);
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement