public void createComponent(String text) {
        if (freeSpace()) {
            int inputs = 0;
            int outputs = 0;
            if (text.equals(CUSTOM)) { // if file is a Json
                JFileChooser fileChooser = new JFileChooser();
                int returnValue = fileChooser.showOpenDialog(null);
                if (returnValue == JFileChooser.APPROVE_OPTION) {
                    File selectedFile = fileChooser.getSelectedFile();
                    listener.actionPerformed(new ActionEvent(this, ADD,
                            id + "#" + text + "#" + selectedFile.getPath()));

                }
            } else {
                if (text.equals(IN)) {
                    inputs = 0;
                    outputs = 1;
                } else if (text.equals(OUT)) {
                    inputs = 1;
                    outputs = 0;
                } else if (text.equals(NOT)) {
                    inputs = 1;
                    outputs = 1;
                } else {
                    inputs = askNumber("Entradas", text, MAX_ENTRADAS);
                    outputs = 1;
                }
                listener.actionPerformed(new ActionEvent(this, ADD,
                        id + "#" + text + "#" + inputs));
            }

            String path = getPath(text, 0);
            String path2 = getPath(text, 1);
            components.append(new Componente(id++, dropArea, path, path2, inputs, outputs));
            repaint();
        }
    }