JTable to show several sets of data

Discussion in 'Java' started by Dag Sunde, Jan 4, 2005.

  1. Dag Sunde

    Dag Sunde Guest

    I have a scenarion where I'm struggling a little bit
    on what is the best approach:

    My base set of data to show is a Bid
    - Coloumn headers are the prices,
    - 24 rows one for each hour in the day
    - the data is volumes for each price/hour
    - The user can add new columns
    - A bid always have two columns (minprice & maxPrice)
    that can't be changed by the user

    The user can add new bids (I maintain a collection of Bid)

    The Gui represent different Bids as Tabs the user can click
    on to select a particular bid to vork with.

    Now to my question:

    Do I put a datamodel into each bid, and use
    table.setModel(bid.model), or do I use a single datamodel
    and write code in that model to retrive data from the "current"
    bid, and call .fireTableStructureChanged() to inform the table
    that it have to redraw itself from scratch?

    Or does anyone have a cpmpletely different idea?

    TIA...

    --
    Dag.
     
    Dag Sunde, Jan 4, 2005
    #1
    1. Advertising

Want to reply to this thread or ask your own question?

It takes just 2 minutes to sign up (and it's free!). Just click the sign up button to choose a username and then you can ask your own questions on the forum.
Similar Threads
  1. Tivo Escobar
    Replies:
    1
    Views:
    7,363
    manusa
    Apr 12, 2007
  2. Replies:
    0
    Views:
    515
  3. Tintin92
    Replies:
    1
    Views:
    1,729
    Andrew Thompson
    Feb 14, 2007
  4. Victor \Zverok\ Shepelev

    RDOC: several related modules in several C files

    Victor \Zverok\ Shepelev, Mar 6, 2007, in forum: Ruby
    Replies:
    3
    Views:
    185
    Max Lapshin
    Mar 16, 2007
  5. Haircuts Are Important
    Replies:
    3
    Views:
    339
    Haircuts Are Important
    Jun 4, 2013
Loading...

Share This Page