// preview panel normal
JPanel cardPreviewContainer = new JPanel();
cardPreviewContainer.setOpaque(false);
cardPreviewContainer.setLayout(null);
BigCard bigCard = new BigCard();
bigCard.setSize(320, 500);
bigCard.setLocation(40, 40);
bigCard.setBackground(new Color(0, 0, 0, 0));
cardPreviewContainer.add(bigCard);
cardPreviewContainer.setVisible(false);
cardPreviewContainer.setBounds(0, 0, 320 + 80, 500 + 30);
ui.addComponent(MageComponents.CARD_PREVIEW_PANE, bigCard);
ui.addComponent(MageComponents.CARD_PREVIEW_CONTAINER, cardPreviewContainer);
desktopPane.add(cardPreviewContainer, JLayeredPane.POPUP_LAYER);
// preview panel rotated
JPanel cardPreviewContainerRotated = new JPanel();
cardPreviewContainerRotated.setOpaque(false);
cardPreviewContainerRotated.setLayout(null);
bigCard = new BigCard(true);
bigCard.setSize(500, 350);
bigCard.setLocation(40, 40);
bigCard.setBackground(new Color(0, 0, 0, 0));
cardPreviewContainerRotated.add(bigCard);
cardPreviewContainerRotated.setVisible(false);
cardPreviewContainerRotated.setBounds(0, 0, 500 + 80, 420 + 30);
ui.addComponent(MageComponents.CARD_PREVIEW_PANE_ROTATED, bigCard);