Okay, so here's the deal. I'm making a Mastermind game. Mastermind is where you try to guess the passcode.. yeah. If you don't know what it is, go google it (Milton Bradley game ).
Anyway, I'm making my game so that 2 windows pop up. One window is the options panel, where you string together your guess for the turn using radio buttons and regular buttons. The radio buttons are in a class that extends Panel, and the regular buttons are also in a class that extends Panel. How do I write my ActionListener so that when "Enter" or whatever is pressed on it's panel, it can capture the radio button currently selected? In other words, how can I make these two classes "talk" to one another?
By the way, the class that keeps the key, the guess (either getting the guess after the "Submit" button or concatenating the guess as it goes along, haven't decided yet), checks for win/right/wrong situations, that class is passed in as a param to both the panels, so they can communicate with the game directly.
I've been having these kind of problems all semester with OOP, trying to get my objects to talk to one another, I've ended up with some really bad cheats in order to make things work..
Any ideas?