Reputation:
I used showConfirmDialog method from JOptionPane with the options: YES_NO_CANCEL. How can I have access and disable NO_BUTTON if a condition is true? Thank you!
Upvotes: 0
Views: 98
Reputation: 27346
Why not just show a different type of dialog if said condition is true?
if(canCancel)
{
JOptionPane.showConfirmDialog(" blah blah blah ");
}
else
{
JOptionPane.showMessageDialog(" blah blah blah ");
}
Upvotes: 2
Reputation: 1073
As far as I know this is impossible without overriding JOptionPane
.
Try searching for swinglabs
or jGoodies
libraries for Java. They have built in type for the thing you need.
Upvotes: 0