2-APL UPC project.
0
fork

Configure Feed

Select the types of activity you want to include in your feed.

added cardbacks

fdesan 004023cc e549de11

+6 -2
+6 -2
code/2apl_platform/environments/cardtable/Table.java
··· 86 86 public void addPlayer(String name, int position, int score, int bid) { 87 87 Integer scoreInt = new Integer(score); 88 88 Integer bidInt = new Integer(bid); 89 - ImageIcon cardBack = new ImageIcon("cards/b.gif"); 89 + 90 + java.net.URL imgURL = getClass().getResource("cards/b.gif"); 91 + ImageIcon cardBack = new ImageIcon(imgURL); 92 + 90 93 91 94 playersPane[position].add(new JLabel("Player: "+name)); 92 95 playersPane[position].add(new JLabel("Bid: "+bidInt.toString())); 93 96 playersPane[position].add(new JLabel(new String("Points: points here"))); 94 97 playersPane[position].add(new JLabel("Score: "+scoreInt.toString())); 95 98 96 - cardsPane[position].add(new JLabel(cardBack)); 99 + cardsPane[position].add(new JButton(cardBack)); 97 100 cardsPane[position].add(new JButton(cardBack)); 98 101 cardsPane[position].add(new JButton(cardBack)); 99 102 cardsPane[position].add(new JButton(cardBack)); ··· 102 105 cardsPane[position].add(new JButton(cardBack)); 103 106 cardsPane[position].add(new JButton(cardBack)); 104 107 setVisible(true); 108 + repaint(); 105 109 } 106 110 107 111 public void updateScore(String name, int position, int score) {