public void actionPerformed(ActionEvent e) { if (e.getSource() == ctl) { this.menu(); } else if (e.getSource() == exit) { exitPerform(); } else if (e.getSource() == rank) { if (count != 0) { card.show(mainPanel, "four"); rankPanel.setMemory(memory, count - 1); buttonPanel.removeAll(); buttonPanel.setBounds(width - 200, height - 80, 190, 50); buttonPanel.add(exit); check = 4; count--; } } else if (e.getSource() == back) { if (secondPanel.clip != null) { secondPanel.clip.stop(); System.out.printf("test"); } check = 0; card.previous(mainPanel); buttonPanel.removeAll(); ctl.setText("- Play -"); buttonPanel.add(ctl); buttonPanel.add(rank); buttonPanel.add(exit); buttonPanel.setOpaque(false); buttonPanel.setBounds(width / 2 - 50, height / 2 - 50, 80, 100); } }
private void prev1() { prevBtn.setEnabled(true); nextBtn.setEnabled(true); doneBtn.setEnabled(false); card.previous(pane); step--; }