public void open(SylladexCard card) { icons.remove(card.getIcon()); icons.trimToSize(); m.setIcons(icons); stack.remove(card); arrangeCards(); m.open(card); }
// Unique methods public void checkBottomCard() { if (m.getNextEmptyCard() == null) { SylladexCard bottomcard = stack.getLast(); icons.trimToSize(); JLabel icon = new JLabel(bottomcard.getIcon().getIcon()); int xpos = m.getScreenSize().width / 2 + (25 * m.getCards().size()); arrow = new JLabel(Main.createImageIcon("modi/stack/arrow.gif")); arrow.setBounds(xpos, m.getDockIconYPosition(), 43, 60); icon.setBounds(xpos + 50, m.getDockIconYPosition(), 43, 60); m.showDock(); foreground.add(arrow); foreground.add(icon); foreground.repaint(); timer.restart(); open(bottomcard); } }