• Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

UB search result view problem

 
K. Tsang
Bartender
Posts: 3583
16
Android Java
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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.
 
Roberto Perillo
Bartender
Posts: 2271
3
Eclipse IDE Java Spring
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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...
 
K. Tsang
Bartender
Posts: 3583
16
Android Java
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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
Posts: 158
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
You can always use unit tests to test your Data class.
 
Jari Timonen
Ranch Hand
Posts: 232
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
I suggest using jUnit, since you can simulate multiple connections at the same time. That is, testing your locking mechanism.
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic