JButton cancel = new JButton("Cancel");\r
boolean accept = false;\r
\r
-\r
public String getName()\r
{\r
return id.getText();\r
public String getDescription()\r
{\r
if (description.getText().length() < 1)\r
+ {\r
return null;\r
+ }\r
else\r
+ {\r
return description.getText();\r
+ }\r
}\r
\r
public EditNameDialog(String name,\r
String label2,\r
String title)\r
{\r
- JLabel idlabel = new JLabel( label1);\r
+ JLabel idlabel = new JLabel(label1);\r
JLabel desclabel = new JLabel(label2);\r
idlabel.setFont(new Font("Courier", Font.PLAIN, 12));\r
desclabel.setFont(new Font("Courier", Font.PLAIN, 12));\r
panel2.add(description, BorderLayout.CENTER);\r
panel.add(panel2, BorderLayout.SOUTH);\r
\r
-\r
- int reply = JOptionPane.showInternalConfirmDialog(Desktop.desktop,\r
+ int reply = JOptionPane.showInternalConfirmDialog(Desktop.desktop,\r
panel, title,\r
- JOptionPane.OK_CANCEL_OPTION );\r
+ JOptionPane.OK_CANCEL_OPTION);\r
\r
- if (reply == JOptionPane.OK_OPTION)\r
- {\r
- accept = true;\r
- }\r
+ if (reply == JOptionPane.OK_OPTION)\r
+ {\r
+ accept = true;\r
+ }\r
}\r
}\r