@Override
    public void focusLost(FocusEvent e) {
        //System.out.println("focus lost");
        String text = this.textField.getText();
        //System.out.println("text is: "+text);
        if (editing) {
            //System.out.println("editing");
            if (required && (text == null || text.length() < 1)) {
                this.textField.setBackground(Color.RED);
                //System.out.println("editing - required field empty");
            } else {
                this.textField.setBackground(origBg);
                //System.out.println("editing - notrequired or not epmty");
                if (!origText.equals(text)&&this.objectId!=-1) {
                    //System.out.println("editing - new valid value, updated");
                    
                    //panelInfo.setBackground(MainFrame.BACKGROUND);
                    panelInfo.add(IMG_OK);
                    panelInfo.validate();
                    panelInfo.repaint();
                    this.updateObject();
                    origText = text;
                } else {
                    //System.out.println(origText+" = "+text);
                }
            }

        } else {
            //System.out.println("notediting");
            if (text == null || text.length() < 1) {
                if (required) {
                    this.textField.setBackground(Color.RED);
                    this.textField.setText(EdentInlineEditableObject.INSERT_VALUE);
                    //System.out.println("creating - empty value in required field");
                }
                //System.out.println("creating - empty value is ok");
            } else {
                this.textField.setBackground(this.origBg);
                //System.out.println("creating - new value");
            }
        }
    }