Hi all, so what im trying to do is create a button that allows the player of my game to enter the number of players they want competing in their tournament. Then they enter the names of the contenders which gets recorded and stored in an array for use later. I created a playerList method to check if it was recording the names correctly, but it keeps returning null without any names. Im intending to use these names later to set up matches between players for advancement in the tournament, so this is a vital part of my project. If anyone could help it would be much appreciated. Thanks and have a great day!
This is the code i consider important to this part of the project. If you need it, I can post the rest of the code for the class, but that code does not effect what I am trying to do here.
Why on earth are you using applets? They are obsolete. Nobody uses them any more.
Why are you using an actionPerformed method to add action listeners to components? Add the listeners straight off in the init method.
You are confusing things by using the same identifier for a List and for a method. But that method is marked void. All the things about new frames in that method look bad. Please write down with a pencil exactly how you are entering names. Write down where those names are going and what status their recipient has.
I promise I will be the best, most loyal friend ever! All for this tiny ad: