package cpa.frame;
import java.awt.EventQueue;
import javax.swing.JFrame;
import javax.swing.JPanel;
import java.awt.GridLayout;
import java.awt.GridBagLayout;
import java.awt.GridBagConstraints;
import java.awt.Insets;
import java.awt.CardLayout;
import java.awt.FlowLayout;
import javax.swing.BoxLayout;
import javax.swing.JButton;
import java.awt.event.ActionListener;
import java.awt.event.ActionEvent;
import java.awt.Color;
import javax.swing.JLabel;
import java.awt.event.MouseAdapter;
import java.awt.event.MouseEvent;
import javax.swing.border.EtchedBorder;
public class zzzzz {
private JFrame frame;
/**
* Launch the application.
*/
public static void main(String[] args) {
EventQueue.invokeLater(new Runnable() {
public void run() {
try {
zzzzz window = new zzzzz();
window.frame.setVisible(true);
} catch (Exception e) {
e.printStackTrace();
}
}
});
}
/**
* Create the application.
*/
public zzzzz() {
initialize();
}
/**
* Initialize the contents of the frame.
*/
private void initialize() {
frame = new JFrame();
frame.setBounds(100, 100, 659, 425);
frame.setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE);
frame.getContentPane().setLayout(null);
JPanel panel = new JPanel();
panel.setBackground(Color.CYAN);
panel.setBounds(0, 97, 643, 289);
frame.getContentPane().add(panel);
panel.setLayout(new BoxLayout(panel, BoxLayout.X_AXIS));
JButton btnNewButton = new JButton("New button");
btnNewButton.addActionListener(new ActionListener() {
public void actionPerformed(ActionEvent e) {
JPanel panel_3 = new JPanel();
panel.add(panel_3);
panel_3.setBounds(20, 40, 100, 100);
panel_3.setBackground(Color.red);
}
});
btnNewButton.setBounds(20, 38, 89, 23);
frame.getContentPane().add(btnNewButton);
JButton btnNewButton_1 = new JButton("New button");
btnNewButton_1.addActionListener(new ActionListener() {
public void actionPerformed(ActionEvent e) {
JPanel panel_4 = new JPanel();
panel.add(panel_4);
panel_4.setBounds(120, 40, 100, 100);
panel_4.setBackground(Color.green);
}
});
btnNewButton_1.setBounds(138, 38, 89, 23);
frame.getContentPane().add(btnNewButton_1);
JButton btnNewButton_2 = new JButton("New button");
btnNewButton_2.addActionListener(new ActionListener() {
public void actionPerformed(ActionEvent e) {
JPanel panel_5 = new JPanel();
panel.add(panel_5);
panel_5.setBounds(220, 40, 100, 100);
panel_5.setBackground(Color.yellow);
}
});
btnNewButton_2.setBounds(253, 38, 89, 23);
frame.getContentPane().add(btnNewButton_2);
JPanel panel_1 = new JPanel();
panel_1.setBorder(new EtchedBorder(EtchedBorder.LOWERED, null, null));
panel_1.setBackground(Color.YELLOW);
JPanel panel_2 = new JPanel();
panel_2.setBorder(new EtchedBorder(EtchedBorder.LOWERED, null, null));
panel_2.setBackground(Color.GREEN);
// btnNewButton_2.setBounds(276, 21, 89, 23);
}
}