| Author |
UB search result view problem
|
K. Tsang
Ranch Hand
Joined: Sep 13, 2007
Posts: 1222
|
|
Hi all, I have a question, in my JTable I delete a record in the middle. The table view is updated nicely. Now I do a search for anything that would include that deleted record, I got the number of records correct but somehow the view shifted down by x record. I printed my record numbers search results out and they are correct.
In my table model I use a map to store the data. I want to ask if I populate mapA with values, then do
mapB = mapA;
would this be the same as doing
mapB.putAll(mapA)?
I want to use mapB ultimately.
|
K. Tsang JavaRanch SCJP5 SCJD/OCM-JD
|
 |
Roberto Perillo
Bartender
Joined: Dec 28, 2007
Posts: 2212
|
|
Hello, my buddy!
Well, I know this isn't the answer you were looking for, but did you choose to offer a delete functionality in your GUI? This isn't really required...
|
Cheers, Bob "John Lennon" Perillo
SCJP, SCWCD, SCJD, SCBCD - Daileon: A Tool for Enabling Domain Annotations
|
 |
K. Tsang
Ranch Hand
Joined: Sep 13, 2007
Posts: 1222
|
|
Yes Rob, I did implemented delete in my GUI as well as create. I know they are not require but without doing in GUI how possible will I do my Data class file really works and ultimately it's all in the table view.
Talking about my problem, I figured it out by figuring the exact key in my map using loops. You know finding these indices can be a pain when you know everything works in the back end.
|
 |
Alecsandru Cocarla
Ranch Hand
Joined: Feb 29, 2008
Posts: 158
|
|
|
You can always use unit tests to test your Data class.
|
SCJP 1.4 100%
SCJD 99.5%
|
 |
Jari Timonen
Ranch Hand
Joined: Jan 16, 2004
Posts: 230
|
|
|
I suggest using jUnit, since you can simulate multiple connections at the same time. That is, testing your locking mechanism.
|
SCJP 5.0, SCJD URLyBird 1.3.3, OCMJEA 5 (SCEA) Factory Homes
|
 |
 |
|
|
subject: UB search result view problem
|
|
|