예제 #1
0
 public void displayPlayerInfo() {
   playerLabel = new JLabel("player: " + parentPanel.Player.getName());
   playerLabel.setForeground(Color.white);
   add(playerLabel);
   scoreLabel = new JLabel("score: " + parentPanel.Player.getScore());
   scoreLabel.setForeground(Color.white);
   add(scoreLabel);
   validate();
   repaint();
 }
예제 #2
0
 public void refreshScore() {
   scoreLabel.setText("score: " + parentPanel.Player.getScore());
   validate();
   repaint();
 }