So I'm working on a Texas Hold 'Em project in University and I've been thrown headfirst into another person's GUI code. I've never used Swing, so I'm having a hard time figuring things out. Hopefully someone can help me out or, at the very least, tell me where I'm going wrong.
We have several panels that make up our GUI, most of them added to one "master" JPanel. We're tracking some global things, such as the deck of cards, in this master panel, but there are buttons within the "subpanels" that do things like placing bets. The problem comes with how these things can interact.
When the button is pressed to place a bet, a new card has to be dealt to the table from the global deck. So, how do I refer back (refer "up" if that makes sense) to the method in the master panel that handles the dealing and advancing of the game state from within the ActionListener attached to the "Place Bet" button in a subpanel?