MCPcopy Create free account
hub / github.com/OpenSourcePhysics/osp / actionPerformed

Method actionPerformed

src/demoJS/Test_Dialog2.java:64–89  ·  view source on GitHub ↗
(ActionEvent e)

Source from the content-addressed store, hash-verified

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);

Callers

nothing calls this directly

Calls 15

showOpenDialogMethod · 0.95
showSaveDialogMethod · 0.95
showConfirmDialogMethod · 0.80
showMessageDialogMethod · 0.80
getSourceMethod · 0.80
getIDMethod · 0.65
printlnMethod · 0.65
setTextMethod · 0.65
getActionCommandMethod · 0.65
setVisibleMethod · 0.65
showInputDialogMethod · 0.45
getAbsolutePathMethod · 0.45

Tested by

no test coverage detected