> You are saying that my Swing code is ok and in different thread of JDBC everyone is said that the code is ok so please tell me where is the problem than
No, I'm saying that it (possibly) looks like your code is in the wrong order
i.e. you have 2 lines inside the 'for loop' that should be outside of it,
1 line should precede, 1 line should follow.
I don't have your db stuff, so it's up to you to make the changes (see my first reply),
and
test to see if they work. If not, post what happened (as in any differences to what you have now)