Aaron Harp

Greenhorn
+ Follow
since Jul 12, 2006
Cows and Likes
Cows
Total received
0
In last 30 days
0
Total given
0
Likes
Total received
0
Received in last 30 days
0
Total given
0
Given in last 30 days
0
Forums and Threads
Scavenger Hunt
expand Ranch Hand Scavenger Hunt
expand Greenhorn Scavenger Hunt

Recent posts by Aaron Harp

If all the buttons are in an array you can use a for loop in the actionPerformed method as well.
15 years ago
Would I just use

Button buttons[];

?
15 years ago
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!

15 years ago
This may be helpful to you.
15 years ago
Oops, didn't think about that.

15 years ago

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?
15 years ago
It doesn't take locales into account but that wouldn't be too difficult.
15 years ago
Here is a method I wrote to take an integer and return its ordinal equivalent. Hope it helps.

15 years ago