In FaxRequestFrame, I think actionConfirmed could be refactored like:
Code:
public void actionConfirmed()
{
int list = FaxRequestFrame.this.monsterIndex;
Object value = FaxRequestFrame.monsterLists[ list ].getSelectedValue();
actionConfirmed( value );
}
public void actionConfirmed( Object value )
{
if ( value == null )
Or maybe the second function could be renamed instead of overloading that function name (especially if it creates some kind of conflict with the button listener, or however that GUI stuff works). Then FaxbotCommand could just be
Code:
FaxRequestFrame.actionConfirmed( command );
However, "command" is a String and "value" needs to be a different data type, and I don't know how to do the conversion.
This would be missing any type of error checking on the input value, at least before getting the "unknown command" message from faxbot.