1

I want to make a miniLayar is shown as option pane with one of the button functioning like tmbATM. Is that possible :( I'm desperate how to do it. and each time that button is pressed, the i value is +1. can anyone figure this out ?

public void action() {
    oke.addActionListener(new ActionListener() {
        public void actionPerformed(ActionEvent e) {
            jlhNasabah = Integer.parseInt(inputAngka.getText());
            for (i = 0; i <= jlhNasabah;) {
                miniLayar.setVisible(true);

                tmbATM.addActionListener(new ActionListener() {
                    public void actionPerformed(ActionEvent e) {
                        i += 1;
                        burstText.append((i) + "\tATM");
                        Nama = JOptionPane.showInputDialog("Masukkan Nama Anda :");
                        Alamat = JOptionPane.showInputDialog("Masukkan Alamat Anda : ");
                        NoKTP = JOptionPane.showInputDialog("Masukkan Nomor KTP Anda : ");
                        syncText.append("Nasabah Put Informasi\n");
                        burstText.append("\t3\t3\t3");
                        burstText.append("\n");

                        miniLayar.setVisible(false);
                        int reply = JOptionPane.showConfirmDialog(null, "Ingin Melanjutkan ?", "Konfirmasi", JOptionPane.YES_NO_OPTION);
                        if (reply == JOptionPane.NO_OPTION) {
                            i = jlhNasabah + 1;
                        }
                    }
                });
            }
        }
    });
}
MadProgrammer
  • 343,457
  • 22
  • 230
  • 366
DovahVinn
  • 15
  • 4
  • I have no idea what you're asking? Can you clarify or possibly provide an example of what you want to achieve? Do mean, something like [this](http://stackoverflow.com/questions/14591089/joptionpane-passing-custom-buttons/14591165#14591165)? – MadProgrammer May 28 '15 at 07:18
  • im sorry, what I mean is how to make a option pane that have 3 button on it, each button will have its own function, like opening a new frame, etc. – DovahVinn May 28 '15 at 14:17

0 Answers0