Ooh … Begitu! I see, I see …


Setelah kelayapan di internet, cari-cari info dari sana-sini dan bongkar pasang tips (terutama programming), akhirnya baru sadar … ternyata begitu caranya … [all about tricks and tips I have found during my work as programmer.]

where to put the JTextField validation block code???

hi Everyone,

I need an advice or suggestion, I have a JTextField for a primary key entry and when the focus leaves the JTextField, the program would make a searching into a database to seek if this entry has already been inside the table. (aka checking double entries).

if the entry is found inside the table, a JOptionPane or JDialog will show up and alert the user that his / her entry code already existed.

I’ve tried to insert the validation searching (using SQL) block in JTextField’s FocusLost, sure the JOptionPane / JDialog appeared, but then no matter when the OK button (inside the JOptionPane / JDialog) was clicked. the JOptionPane / JDialog would still show up again and again.

do you have any idea about how to solve this problem? any advice? or better way to do this?
thank you so much for dropping by your message. šŸ™‚


Filed under: Java programming

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out /  Change )

Google+ photo

You are commenting using your Google+ account. Log Out /  Change )

Twitter picture

You are commenting using your Twitter account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )


Connecting to %s


%d bloggers like this: