settingsButton.addActionListener(new ActionListener() {
@Override
public void actionPerformed(ActionEvent e) {
ConfigDialog dialog = new ConfigDialog(frame, config);
dialog.create();
}
});
public void create(){
GridLayout layout = new GridLayout(4, 2, 8, 8);
BorderLayout borderLayout = new BorderLayout(GAP, GAP);
JPanel panel = new JPanel(layout);
panel.setBorder(BorderFactory.createEmptyBorder(GAP, GAP, GAP, GAP));
panel.setLayout(borderLayout);
panel.add(createLabels(), BorderLayout.WEST);
panel.add(createTextFields(), BorderLayout.CENTER);
panel.add(createButtons(), BorderLayout.SOUTH);
getContentPane().add(panel);
pack();
setLocationRelativeTo(getOwner());
setVisible(true);
}