• Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other Pie Elite all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Tim Cooke
  • paul wheaton
  • Liutauras Vilda
  • Ron McLeod
Sheriffs:
  • Jeanne Boyarsky
  • Devaka Cooray
  • Paul Clapham
Saloon Keepers:
  • Scott Selikoff
  • Tim Holloway
  • Piet Souris
  • Mikalai Zaikin
  • Frits Walraven
Bartenders:
  • Stephan van Hulst
  • Carey Brown

JTable with hashmap--please help

 
Ranch Hand
Posts: 56
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
I am listing the code below

My questions are

1) if my hashmap(contractorRecords) gets 14 records there are more calls to getRowCount. Why is that happening. when I move up and down the scroll bar then values change in the console.

2)I am using hashmap in which the key are the record Numbers. I have no idea how to pass the keys to the main file so that it can be selected my the client but at the same time should not be displayed in the table.

 
Ranch Hand
Posts: 40
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
I don't understand your problem, but it would be easyer if you used an arraylist instead of a hashtable.
 
uzma ali
Ranch Hand
Posts: 56
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
if I use arrayList how can I take the rec No to the next step in the GUI where we need the rec No for the book.

Please help as I am really stuck and no way to find help

uzma
 
Ranch Hand
Posts: 47
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Uzma,

How did ypu finally work around this issue of displaying the hashmap in a JTable. I am facing a similar issue currently and i came across your post here.

Your help would be much appreciated.

Thanks,
david
 
Ranch Hand
Posts: 88
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Hi Uzma,

(First Question)

Could you explain further I do not understand your question. It sounds like a Swing rendering issue but I am not sure.

(Second Question)

You can have the TableModel store, but not display, the column numbers as part of the data model.

Tom
 
You guys wanna see my fabulous new place? Or do you wanna look at this tiny ad?
Smokeless wood heat with a rocket mass heater
https://woodheat.net
reply
    Bookmark Topic Watch Topic
  • New Topic