Find centralized, trusted content and collaborate around the technologies you use most.
Teams
Q&A for work
Connect and share knowledge within a single location that is structured and easy to search.
我使用了 JOptionPane 中的 showConfirmDialog 方法和选项:YES_NO_CANCEL。如果条件为真,我如何访问和禁用 NO_BUTTON?谢谢!
如果所述条件为真,为什么不只显示不同类型的对话框?
if(canCancel) { JOptionPane.showConfirmDialog(" blah blah blah "); } else { JOptionPane.showMessageDialog(" blah blah blah "); }
据我所知,如果不覆盖,这是不可能的JOptionPane。
JOptionPane
尝试搜索Javaswinglabs或jGoodies库。他们为您需要的东西内置了类型。
swinglabs
jGoodies