0

I have the following Dialog box in my application. I use a JPanel to show the following components in the dialogbox but I see that the confirm buttons aren't shown well. I'd prefer to solve the problem with default dialog boxes. Is it possible to solve this problem or I need to define my dialog. If I have to define my dialog, how can I return the option values as the confirm dialog does?

enter image description here

I call the showConfirmDialog in this mode:

            InterruptionRecoveryPanel irp = 
                    new InterruptionRecoveryPanel(cmo);
            int res = JOptionPane.showConfirmDialog(
                    AppJFrame.this, irp, 
                    "Conferma della operazione interrotta!", 
                    JOptionPane.OK_CANCEL_OPTION);
Johnny
  • 1,509
  • 5
  • 25
  • 38

1 Answers1

0

I used BoxLayout for InterruptionRecoveryPanel. I added some
to the options texts and then I set the AlignmentX of its 3 subpanels to LEFT_ALIGNMENT; I just for aesthetic reasons. The things I had wanted to do before and I never thought that they could be related to this problem. So the problem was solved. I don't know why! It was completely accidently! I appreciate if someone could tell me why it happened.

enter image description here

Johnny
  • 1,509
  • 5
  • 25
  • 38