class Deal implements ActionListener
{
public void actionPerformed(ActionEvent e)
{
dl.setDeck();
dl.shuffle();
dl.firstDraw(pl);
for(Card c:pl.showHand())
panelplay.add(new JLabel(c.getImageIcon()));
panelplay.validate();
}
}
This is an event handler for Jbutton. The pl.showHand () method returns an ArrayList for the user-defined Map class. Inserting println () inside the loop shows printing, so the code is executed, but the Panelplay panel does not display the map.
source
share