getJFrame().requestFocus();
if(!isEnabled)
getJFrame().setEnabled(false);
if (answer == JOptionPane.OK_OPTION)
{
fetcher = new FIDataFetcher(
panel.getJTextField().getText(),
new String (
panel.getJPasswordField().getPassword()));
int response = fetcher.login();
if(response == 0)
{
userPass = new String[2];
userPass[0] = panel.getJTextField().getText();
userPass[1] = new String(
panel.getJPasswordField().getPassword());
if(panel.getJCheckBox().isSelected())
{
EncodedFileReadWrite.write(
panel.getJTextField().getText(),
String.valueOf(
panel.getJPasswordField().getPassword()));
}
}
else if(response == 1)
{
fetcher = null;
getDisplay().setText(Color.RED,
"Incorect username or password.");
}
else
{
fetcher = null;
getDisplay().setText(Color.RED,
"Error, could not connect to server.");
}
}
else
{
getDisplay().setText("Operation aborted by user.");
}
}
else
{
fetcher = new FIDataFetcher(userPass[0], userPass[1]);
int response = fetcher.login();
if(response == 1)
{
fetcher = null;
getDisplay().setText(Color.RED,