public void setCards(String dealerHand, String playerHands) {
        dealerCards.removeAll();
        playerCards.removeAll();

        Pattern pat = Pattern.compile("\\w+-\\w+");
        Matcher mat = pat.matcher(dealerHand);

        while (mat.find()) {
            String pic = mat.group(0);
            pic = pic.replace("-", "_");
            pic += ".png";
            ImageIcon icon = new ImageIcon(carddir + pic);
            JLabel card = new JLabel(icon);
            dealerCards.add(card);
        }
        dealerCards.repaint();
        dealerCards.revalidate();

        if (playerHands.contains("], [")) {
        	playerHands = playerHands.replace("], [", ",1-barr,");
        }

        mat = pat.matcher(playerHands);
        while (mat.find()) {
            String pic = mat.group(0);
            pic = pic.replace("-", "_");
            pic += ".png";
            ImageIcon icon = new ImageIcon(carddir + pic);
            JLabel card = new JLabel(icon);
            playerCards.add(card);
        }
        playerCards.repaint();
        playerCards.revalidate();
    }