private void initComponent() {

            this.setSize(320, 240);
            this.setTitle(AppManager.getResources().getString("mainmenubar.newprojectaction"));

            fileNameLb = new JLabel(AppManager.getResources().getString("mainmenubar.newprojectaction.label_filename"));
            idLb = new JLabel(AppManager.getResources().getString("mainmenubar.newprojectaction.label_id"));
            textLb = new JLabel(AppManager.getResources().getString("mainmenubar.newprojectaction.label_text"));
            descLb = new JLabel(AppManager.getResources().getString("mainmenubar.newprojectaction.label_desc"));
            fileName = new JTextField();
            id = new DigitOnlyField();
            text = new JTextField();
            desc = new JTextField();

            editPanel = new JPanel(new GridBagLayout());
            editPanel.setBorder(BorderFactory.createTitledBorder(AppManager.getResources().getString("mainmenubar.newprojectaction.label_workflow")));
            GridBagConstraints c = new GridBagConstraints();
            c.fill = GridBagConstraints.BOTH;
            c.weightx = 1.0;
            c.weighty = 1.0;
            c.gridx = 0;
            c.gridwidth = 1;
            editPanel.add(fileNameLb, c);
            c.gridx = 1;
            c.gridwidth = 2;
            editPanel.add(fileName, c);
            c.gridx = 0;
            c.gridwidth = 1;
            editPanel.add(idLb, c);
            c.gridx = 1;
            c.gridwidth = 2;
            editPanel.add(id, c);
            c.gridx = 0;
            c.gridwidth = 1;
            editPanel.add(textLb, c);
            c.gridx = 1;
            c.gridwidth = 2;
            editPanel.add(text, c);
            c.gridx = 0;
            c.gridwidth = 1;
            editPanel.add(descLb, c);
            c.gridx = 1;
            c.gridwidth = 2;
            editPanel.add(desc, c);

            btnPanel = new JPanel(new FlowLayout(FlowLayout.RIGHT));
            confirmBtn = new JButton(AppManager.getResources().getString("mainmenubar.newprojectaction.label_create"));
            confirmBtn.addActionListener(new ActionListener() {
                public void actionPerformed(ActionEvent e) {
                    ProjectResource project = new ProjectResource();
                    if (isEmpty(fileName)) {
                        showDialog(AppManager.getResources().getString("mainmenubar.newprojectaction.filename_notempty"));
                        return;
                    } else if (!fileName.getText().endsWith(".xml")) {
                        fileName.setText(fileName.getText() + ".xml");
                    }

                    if (isEmpty(id)) {
                        showDialog(AppManager.getResources().getString("mainmenubar.newprojectaction.id_notempty"));
                        return;
                    }
                    if (isEmpty(text)) {
                        showDialog(AppManager.getResources().getString("mainmenubar.newprojectaction.text_notempty"));
                        return;
                    }
                    project.setID(Long.valueOf(id.getText()));
                    project.setText(text.getText());
                    project.setFileName(fileName.getText());
                    project.setDescription(desc.getText());
                    XmlWriter writer = new XmlWriter();
                    String databasePath = app.getModel().getDatabasePath();
                    if (writer.saveProject(project, databasePath + fileName.getText())) {
                        app.getView().reloadProject();
                        app.getView().showProject(project, null);
                        NewProjectDialog.this.dispose();
                    }
                }

                private void showDialog(String message) {
                    JOptionPane.showMessageDialog(null, message);
                }

                private boolean isEmpty(JTextField jtf) {
                    return jtf.getText().trim().length() <= 0;
                }
            });
            btnPanel.add(confirmBtn);

            this.setLayout(new BorderLayout());
            this.add(editPanel, BorderLayout.CENTER);
            this.add(btnPanel, BorderLayout.SOUTH);

        }