*/\r
private static final long serialVersionUID = 1L;\r
private boolean canNotBeEmpty = false;\r
+ private JFrame topFrame = null;\r
String archs;\r
JButton button;\r
- static JFrame frame;\r
GenListDialog dialog;\r
protected static final String EDIT = "edit";\r
\r
- public ListEditor() {\r
- \r
+ public ListEditor(JFrame frame) {\r
+ topFrame = frame;\r
button = new JButton();\r
button.setActionCommand(EDIT);\r
button.addActionListener(this);\r
button.setBorderPainted(false);\r
\r
\r
- dialog = new GenListDialog(this);\r
+ dialog = new GenListDialog(this, frame);\r
\r
}\r
\r
- public ListEditor(Vector<String> v) {\r
- this();\r
+ public ListEditor(Vector<String> v, JFrame frame) {\r
+ this(frame);\r
dialog.initList(v);\r
}\r
\r
else { //User pressed dialog's "OK" button.\r
Vector<String> v = dialog.getList();\r
if (canNotBeEmpty && v.size() == 0) {\r
- JOptionPane.showMessageDialog(frame, "You must select at least one item.");\r
+ JOptionPane.showMessageDialog(topFrame, "You must select at least one item.");\r
return;\r
}\r
String s = " ";\r