Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- public class Interfaces {
- public static void main(String[] args) {
- JFrame v = new JFrame();
- v.setLayout(new BorderLayout());
- v.setBounds(100, 100, 450, 300);
- Hugo: import java.awt.BorderLayout;
- import java.awt.event.ActionEvent;
- import java.awt.event.ActionListener;
- import javax.swing.*;
- import javax.swing.border.EmptyBorder;
- public class Interfaces {
- public static void main(String[] args) {
- JFrame v = new JFrame();
- v.setLayout(new BorderLayout());
- v.setBounds(100, 100, 450, 300);
- JPanel panel = new JPanel();
- v.add(panel, BorderLayout.SOUTH);
- panel.setLayout(new BorderLayout(0, 0));
- JPanel panel_1 = new JPanel();
- panel.add(panel_1, BorderLayout.EAST);
- panel_1.setLayout(new BoxLayout(panel_1, BoxLayout.Y_AXIS));
- final JButton btnNewButton_3 = new JButton("New button");
- panel_1.add(btnNewButton_3);
- JButton btnNewButton_4 = new JButton("New button");
- panel_1.add(btnNewButton_4);
- JButton btnNewButton_2 = new JButton("New button");
- panel_1.add(btnNewButton_2);
- JPanel panel_2 = new JPanel();
- panel.add(panel_2, BorderLayout.WEST);
- JButton btnNewButton = new JButton("New button");
- panel_2.add(btnNewButton);
- JButton btnNewButton_1 = new JButton("New button");
- panel_2.add(btnNewButton_1);
- btnNewButton_3.addActionListener(new ActionListener() {
- public void actionPerformed(ActionEvent arg0) {
- //label1.setText("¡Adiós mundo!");
- //label1.setText(editorPane.getText());
- btnNewButton_3.setText(btnNewButton_3.getText()+"1");
- }
- });
- v.pack();
- v.setVisible(true);
- v.setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE);
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement