JButton btnNewButton = new JButton("Save");
btnNewButton.addActionListener(new ActionListener() {
public void actionPerformed(ActionEvent arg0) {
ModConnector mt = ModConnector.getInstance();
mt.conClose();
//Set new configuration
SerialProperties.setProperties(baud.getSelectedItem().toString(),
port.getSelectedItem().toString(), encoding.getSelectedItem().toString());