|
@@ -21,17 +21,7 @@ import java.net.URLDecoder;
|
|
|
import java.security.CodeSource;
|
|
|
import java.util.ArrayList;
|
|
|
|
|
|
-import javax.swing.DefaultListModel;
|
|
|
-import javax.swing.ImageIcon;
|
|
|
-import javax.swing.JButton;
|
|
|
-import javax.swing.JDialog;
|
|
|
-import javax.swing.JFileChooser;
|
|
|
-import javax.swing.JLabel;
|
|
|
-import javax.swing.JList;
|
|
|
-import javax.swing.JPanel;
|
|
|
-import javax.swing.JScrollPane;
|
|
|
-import javax.swing.JTextField;
|
|
|
-import javax.swing.SwingConstants;
|
|
|
+import javax.swing.*;
|
|
|
import javax.swing.border.EmptyBorder;
|
|
|
import javax.swing.filechooser.FileNameExtensionFilter;
|
|
|
|
|
@@ -69,19 +59,19 @@ public class AddObjectPopUp extends JDialog {
|
|
|
|
|
|
|
|
|
* Launch the application.
|
|
|
- *
|
|
|
+ *
|
|
|
* @param args
|
|
|
* standard
|
|
|
*/
|
|
|
- public static void main(String[] args) {
|
|
|
- try {
|
|
|
- AddObjectPopUp dialog = new AddObjectPopUp(false, null, null);
|
|
|
- dialog.setDefaultCloseOperation(JDialog.DISPOSE_ON_CLOSE);
|
|
|
- dialog.setVisible(true);
|
|
|
- } catch (Exception e) {
|
|
|
- e.printStackTrace();
|
|
|
- }
|
|
|
- }
|
|
|
+
|
|
|
+
|
|
|
+
|
|
|
+
|
|
|
+
|
|
|
+
|
|
|
+
|
|
|
+
|
|
|
+
|
|
|
|
|
|
|
|
|
* Create the dialog.
|
|
@@ -99,11 +89,12 @@ public class AddObjectPopUp extends JDialog {
|
|
|
this.setIconImage(new ImageIcon(this.getClass().getResource("/Images/Dummy_House.png")).getImage()
|
|
|
.getScaledInstance(30, 30, Image.SCALE_SMOOTH));
|
|
|
setBounds(100, 100, 450, 342);
|
|
|
+ setLocationRelativeTo(this.getParent());
|
|
|
getContentPane().setLayout(new BorderLayout());
|
|
|
contentPanel.setBorder(new EmptyBorder(5, 5, 5, 5));
|
|
|
getContentPane().add(contentPanel, BorderLayout.CENTER);
|
|
|
contentPanel.setLayout(null);
|
|
|
- hElements = new ArrayList<HolonElement>();
|
|
|
+ hElements = new ArrayList<>();
|
|
|
this.setTitle(Languages.getLanguage()[58]);
|
|
|
{
|
|
|
JLabel lblName = new JLabel(Languages.getLanguage()[59]);
|