Hi, I want to create a JOptionPane with two buttons (ok, cancel), these buttons are completely customized with an own class extending JButton. I manage to create the JOptionPane so that it looks allright, but pushing the buttons does nothing. The only way to dispose the dialog is to close the window. Anyone know why?
My code looks like this
static boolean showConfirmDialog(String title, String text) {
KButton[] buttons = new KButton[] {new KButton("ok"), new KButton("cancel")};
JOptionPane pane = new JOptionPane(text, JOptionPane.PLAIN_MESSAGE, JOptionPane.DEFAULT_OPTION, null, buttons, buttons[0]);
JDialog dialog = pane.createDialog(contentPanel, title);
dialog.show();
System.out.println("" + pane.getValue());
return true;
}