package jimmm.test;
import javax.swing.JFrame;
import jimmm.data.Card;
import jimmm.data.Card.Color;
import jimmm.data.Card.Value;
import jimmm.gui.CardPanel;
import jimmm.gui.PlayerCardsLayoutManager;
public class CardDrawer {
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);
}
}