Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- package presentacion;
- import java.awt.EventQueue;
- import javax.swing.JFrame;
- import javax.swing.JButton;
- import javax.swing.JLabel;
- import javax.swing.JTextField;
- import java.awt.Color;
- public class multiTab {
- private JFrame frame;
- private JTextField textField;
- /**
- * Launch the application.
- */
- public static void main(String[] args) {
- EventQueue.invokeLater(new Runnable() {
- public void run() {
- try {
- multiTab window = new multiTab();
- window.frame.setVisible(true);
- } catch (Exception e) {
- e.printStackTrace();
- }
- }
- });
- }
- /**
- * Create the application.
- */
- public multiTab() {
- initialize();
- }
- /**
- * Initialize the contents of the frame.
- */
- private void initialize() {
- frame = new JFrame();
- frame.getContentPane().setBackground(new Color(0, 128, 0));
- frame.setBounds(100, 100, 450, 300);
- frame.setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE);
- frame.getContentPane().setLayout(null);
- //a continuaciΓ³n una lista de botones enumerados por indice , en los cual lo que esta entre comillas es el contenido que se va a mostrar
- // EJ : "putitos"
- // el usuario no podra ingresar los valores que se les cante del orto poner en cada tablero como la otra version
- // se ve mas fachera
- //hay que poner un set en putitos con los valores
- // hay que ponerle un ciclo
- JButton btnNewButton_0 = new JButton("putitos");
- btnNewButton_0.setBounds(10, 10, 50, 50);
- frame.getContentPane().add(btnNewButton_0);
- JButton btnNewButton_1 = new JButton("New button");
- btnNewButton_1.setBounds(10, 70, 50, 50);
- frame.getContentPane().add(btnNewButton_1);
- JButton btnNewButton_2 = new JButton("New button");
- btnNewButton_2.setBounds(10, 130, 50, 50);
- frame.getContentPane().add(btnNewButton_2);
- JButton btnNewButton_3 = new JButton("New button");
- btnNewButton_3.setBounds(10, 190, 50, 50);
- frame.getContentPane().add(btnNewButton_3);
- JButton btnNewButton_4 = new JButton("New button");
- btnNewButton_4.setBounds(70, 10, 50, 50);
- frame.getContentPane().add(btnNewButton_4);
- JButton btnNewButton_5 = new JButton("New button");
- btnNewButton_5.setBounds(70, 70, 50, 50);
- frame.getContentPane().add(btnNewButton_5);
- JButton button = new JButton("50");
- button.setBounds(70, 130, 50, 50);
- frame.getContentPane().add(button);
- JButton btnNewButton_6 = new JButton("New button");
- btnNewButton_6.setBounds(70, 190, 50, 50);
- frame.getContentPane().add(btnNewButton_6);
- JButton button_1 = new JButton("");
- button_1.setBounds(130, 10, 50, 50);
- frame.getContentPane().add(button_1);
- JButton btnNewButton_7 = new JButton("New button");
- btnNewButton_7.setBounds(130, 70, 50, 50);
- frame.getContentPane().add(btnNewButton_7);
- JButton button_2 = new JButton("50");
- button_2.setBounds(130, 130, 50, 50);
- frame.getContentPane().add(button_2);
- JButton btnNewButton_8 = new JButton("New button");
- btnNewButton_8.setBounds(130, 190, 50, 50);
- frame.getContentPane().add(btnNewButton_8);
- JButton btnNewButton_9 = new JButton("New button");
- btnNewButton_9.setBounds(190, 10, 50, 50);
- frame.getContentPane().add(btnNewButton_9);
- JButton button_3 = new JButton("50");
- button_3.setBounds(190, 70, 50, 50);
- frame.getContentPane().add(button_3);
- JButton button_4 = new JButton("50");
- button_4.setBounds(190, 130, 50, 50);
- frame.getContentPane().add(button_4);
- JButton btnNewButton_10 = new JButton("New button");
- btnNewButton_10.setBounds(186, 190, 50, 50);
- frame.getContentPane().add(btnNewButton_10);
- JLabel label = new JLabel("2048");
- label.setBounds(316, 40, 46, 14);
- frame.getContentPane().add(label);
- JLabel lblIngreseSuNombre = new JLabel("ingrese su nombre :");
- lblIngreseSuNombre.setBounds(281, 106, 127, 14);
- frame.getContentPane().add(lblIngreseSuNombre);
- textField = new JTextField();
- textField.setBounds(281, 130, 117, 20);
- frame.getContentPane().add(textField);
- textField.setColumns(10);
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment