(ActionEvent e)
| 62 | content.add(new JLabel("this is the option panel"), BorderLayout.CENTER); |
| 63 | b.addActionListener(new ActionListener() { |
| 64 | @Override |
| 65 | public void actionPerformed(ActionEvent e) { |
| 66 | new AsyncDialog().showConfirmDialog(Test_Dialog2.this, |
| 67 | "<html>The frame is now " + (isResizable() ? "" : "<b>NOT</b> ") |
| 68 | + "resizable. Switch that?</html>", |
| 69 | "Testing JOptionPane", JOptionPane.YES_NO_OPTION, new ActionListener() { |
| 70 | |
| 71 | @Override |
| 72 | public void actionPerformed(ActionEvent e) { |
| 73 | switch (e.getID()) { |
| 74 | case JOptionPane.YES_OPTION: |
| 75 | setResizable(!isResizable()); |
| 76 | break; |
| 77 | case JOptionPane.NO_OPTION: |
| 78 | break; |
| 79 | case JOptionPane.CLOSED_OPTION: |
| 80 | System.out.println("Confirm canceled"); |
| 81 | return; |
| 82 | } |
| 83 | String msg = "this.isResizable() == " + isResizable(); |
| 84 | System.out.println(msg); |
| 85 | status.setText(msg); |
| 86 | } |
| 87 | |
| 88 | }); |
| 89 | } |
| 90 | |
| 91 | }); |
| 92 | p.add(b); |
nothing calls this directly
no test coverage detected