|
|
@ -0,0 +1,32 @@ |
|
|
|
package de.tims.leaderboard; |
|
|
|
|
|
|
|
import java.util.List; |
|
|
|
|
|
|
|
import javax.swing.*; |
|
|
|
|
|
|
|
import de.tims.player_management.Player; |
|
|
|
|
|
|
|
public class LeaderboardGUITest { |
|
|
|
|
|
|
|
private JFrame frame; |
|
|
|
private JPanel panel; |
|
|
|
Leaderboard leaderboard; |
|
|
|
|
|
|
|
public LeaderboardGUITest() { |
|
|
|
frame = new JFrame("LeaderboardGUITest"); |
|
|
|
leaderboard = new Leaderboard(List.of(new Player("Eins", 0), new Player("Zwei", 130), new Player("Drei", 20), new Player("Vier", 10), |
|
|
|
new Player("Fuenf", 20), new Player("Sechs", 70), new Player("Sieben", 60), new Player("Acht", 20), |
|
|
|
new Player("Neun", 60), new Player("Zehn", 50), new Player("Elf", 90), new Player("Zwoelf", 20), |
|
|
|
new Player("Dreizehn", 40), new Player("Vierzehn", 80)), "Neun"); |
|
|
|
panel = leaderboard.buildLeaderboard(); |
|
|
|
|
|
|
|
frame.add(panel); |
|
|
|
frame.setSize(240, 240); |
|
|
|
frame.setVisible(true); |
|
|
|
} |
|
|
|
|
|
|
|
public static void main(String[] args) { |
|
|
|
new LeaderboardGUITest(); |
|
|
|
} |
|
|
|
|
|
|
|
} |