setLayout(new BorderLayout()); JPanel labels = new JPanel(); JPanel components = new JPanel();
GridBagLayout layout = new GridBagLayout(); setLayout(layout); GridBagConstraints constraints = new GridBagConstraints();
	private void init() {		setLayout(new BorderLayout());		JPanel labels = new JPanel();		JPanel components = new JPanel();		List<Component> list = getSettingsComponents();		revert();		labels.setLayout(new GridLayout(list.size(), 1));		components.setLayout(new GridLayout(list.size(), 1));		add(labels, BorderLayout.WEST);		add(components, BorderLayout.CENTER);		JLabel label = null;		for (int i = 0; i < list.size(); i++) {			Component c = list.get(i);			label = new JLabel(" " + c.getName() + ": ");			label.setHorizontalAlignment(SwingConstants.RIGHT);			labels.add(label);			components.add(c);		}				// Buttons panel		JPanel bottom = new JPanel();		bottom.setLayout(new FlowLayout());		JButton defaultsButton = new JButton("Defaults");		defaultsButton.addActionListener(new ActionListener() {			public void actionPerformed(ActionEvent evt) {				defaults();			}		});		bottom.add(defaultsButton);		JButton revertButton = new JButton("Revert");		revertButton.addActionListener(new ActionListener() {			public void actionPerformed(ActionEvent evt) {				revert();			}		});		bottom.add(revertButton);		JButton applyButton = new JButton("Apply");		applyButton.addActionListener(new ActionListener() {			public void actionPerformed(ActionEvent evt) {				apply();			}		});		bottom.add(applyButton);		add(bottom, BorderLayout.SOUTH);	}