Java DateComboBox focus problem

I have a editable DateComboBox and need to validate user-entered data on focusLost.  However, I can't seem to trap the focusLost event.

Never really used this component before....anybody have any tips or outright answers?
m_cmbStartDate.addFocusListener(this);
 
//<snip>
 
    @Override
    public void focusLost(FocusEvent e) {
        System.out.println(e.getSource().toString());
    }

Open in new window

bdzotAsked:
Who is Participating?
 
objectsCommented:
> won't it trigger the focusLost event in the class it's in?

it would (when it loses focus). But it sounds like its not focus lost that you are interested in.

0
 
CEHJCommented:
Please post more code so we can see the full context
0
 
bdzotAuthor Commented:
There's not much more too it...a couple lines of code to put the date retrieved from the database in, and a couple lines of code to save the date to the database.

Oh, and the declaration:  
private com.jidesoft.combobox.DateComboBox m_cmbStartDate;
0
Cloud Class® Course: Certified Penetration Testing

This CPTE Certified Penetration Testing Engineer course covers everything you need to know about becoming a Certified Penetration Testing Engineer. Career Path: Professional roles include Ethical Hackers, Security Consultants, System Administrators, and Chief Security Officers.

 
CEHJCommented:
Make sure you're adding the right FocusListener
0
 
bdzotAuthor Commented:
With:

m_cmbStartDate.addFocusListener(this);

won't it trigger the focusLost event in the class it's in?
0
 
objectsCommented:
sounds like you should be adding a PopupMenuListener instead of a FocusListener

0
 
CEHJCommented:
>>won't it trigger the focusLost event in the class it's in?

Yes, but there's a possibility of confusion if there are multiple listeners around
0
Question has a verified solution.

Are you are experiencing a similar issue? Get a personalized answer when you ask a related question.

Have a better answer? Share it in a comment.

All Courses

From novice to tech pro — start learning today.