Package jimmm.test

Source Code of jimmm.test.CardDrawer

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);
   

  }

}
TOP

Related Classes of jimmm.test.CardDrawer

TOP
Copyright © 2018 www.massapi.com. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.