Quero pegar esse trechod e codigo e por ele em uma classe separada como faço??
void jRegButton_actionPerformed(ActionEvent e)
{
if (jRegButton.getText() == "Register")
{
try
{
theRegistration.setHandler(this);
theRegistration.setXTFTemplate(cbXTF.isSelected());
//MainFrame.connectionPriorities[connectionPriorityList.getSelectedIndex()];
theRegistration.setConnectionPriority(connectionPriorityCodes[cbConnectionPriorityList.getSelectedIndex()]);
theRegistration.register();
// start registration:
jLabel1.setText("Coloque o dedo no sensor quatro vezes.");
contador = 1;
enableButtons(false);
jRegButton.setEnabled(true);
jRegButton.setText("Cancel");
}
catch (Exception ex)
{
jStatusLabel.setText(ex.getMessage());
}
}
else
{
// cancel registration
theRegistration.cancel();
}
}