I have the following code and I know there must be a way to simplify it, I just don't know enough about Java to know how. Is there any way that you could create an array of buttons? That way I could just use a for loop to set their values, position, and create them. Thanks in advance!
Originally posted by Tom Sullivan: I'm interested in this from a learning perpsective. Why don't you create test methods that will test the string for type? Then you could return an enum.
I'm very new to java so I'm interested in this as well. Would this approach not work? Could you not have a method that checks the type and then sends the passed data to the appropriate method to handle it?