Original Post
alright I got the gui stuff down with buttons, text fields, ect. now I am having troubles with the actions affecting the rest of my code. I built the class that does my gui seperate from the rest of my code then just created an object for it in the beginning of my other code. I have a switch so that if the player clicks one of the three buttons on the main menu it will take you to a different screen. So when you click the button it sets the variable selection to 1, 2, or 3 depending on which button you click. I have a getSelection method in the gui class which I then use with my switch statement but it automatically runs before the person can press a button and so it returns 0. I was thinking I could put everything in my main menus actionPerformed() but that didn't seem right to me. I have been trying many different things and I have looked on google and some books for some help but I think I am just totally lost. [Edited by - Grahf750 on February 22, 2005 3:44:16 PM]