Practice: PlayerPanel

Take out a piece of paper. We’ll be programming on paper.

Problem 1

Create a PlayerPanel class that extends JPanel.

The PlayerPanel class must have a Player instance variable and a highlight property.

The PlayerPanel class should render the player’s name and score in the panel. When the panel is highlighted the panel should have a border.

PlayerPanel should have methods to update the player’s score. When the score updates the panel should repaint.

Show me your code before you leave