File APIs for Java Developers
Manipulate DOC, XLS, PPT, PDF and many others from your application.
http://aspose.com/file-tools
The moose likes Developer Certification (SCJD/OCMJD) and the fly likes UB search result view problem Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login
JavaRanch » Java Forums » Certification » Developer Certification (SCJD/OCMJD)
Bookmark "UB search result view problem" Watch "UB search result view problem" New topic
Author

UB search result view problem

K. Tsang
Bartender

Joined: Sep 13, 2007
Posts: 2415
    
    7

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 OCPJP7 OCPWCD5
Roberto Perillo
Bartender

Joined: Dec 28, 2007
Posts: 2265
    
    3

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
Bartender

Joined: Sep 13, 2007
Posts: 2415
    
    7

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: 232
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
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: UB search result view problem