public static void main(String[] args) {
JFrame mainFrame = new JFrame("Testduell");
JFrame.setDefaultLookAndFeelDecorated(true);
mainFrame.setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE);
PlayerCardsLayoutManager lm = new PlayerCardsLayoutManager(false);
mainFrame.setLayout(lm);
mainFrame.setBounds(100, 100, 1000, 500);
for(Color c : Color.values()) {
for(Value v : Value.values()) {
CardPanel cp = new CardPanel(new Card(v, c, true));
mainFrame.add(cp);
}
}
System.out.println("Computed size: " + lm.preferredLayoutSize(mainFrame.getContentPane()));
mainFrame.pack();
mainFrame.setVisible(true);