public BotConfigDialog(JFrame parent, Set<IPlayer> ghostPlayers) {
super(parent, "Configure Bot", true);
if (ghostPlayers != null) {
this.ghostPlayers.addAll(ghostPlayers);
}
this.replacePlayer = !this.ghostPlayers.isEmpty();
setLayout(new BorderLayout());
add(switchBotPanel(), BorderLayout.NORTH);
botSpecificCardsPanel = new JPanel(new CardLayout());
botSpecificCardsPanel.add(new JPanel(), TESTBOT_PANEL);
JScrollPane princessScroll = new JScrollPane(princessPanel());
botSpecificCardsPanel.add(princessScroll, PRINCESS_PANEL);
CardLayout cardlayout = (CardLayout) (botSpecificCardsPanel.getLayout());
cardlayout.show(botSpecificCardsPanel, PRINCESS_PANEL);
add(botSpecificCardsPanel, BorderLayout.CENTER);
butOK.addActionListener(this);
add(okayPanel(), BorderLayout.SOUTH);
if (replacePlayer) {
add(selectPlayerToReplacePanel(), BorderLayout.WEST);
}
validate();
pack();
setSize(new Dimension(600, 600));
setLocationRelativeTo(parent);
}