Results 1 to 2 of 2
  1. #1
    tiro is offline Member
    Join Date
    Mar 2009
    Rep Power

    Default Map in TableModel

    I'm trying to get the values of the currency and amount of JTableModel and then show the new values in JDialog which also has a table with two columns for key and value but there is no thing as I want. I need help

  2. #2
    Steve11235's Avatar
    Steve11235 is offline Senior Member
    Join Date
    Dec 2008
    Rep Power


    TableModel is an interface, which means you can fill in the methods however you want. There are *no* limitations as to how you you store the data; you choose how to provide the data to each cell in the table.

    DefaultTableModel is a simple implementation of TableModel that is fairly easy to use.

    Look at the API for each component and see how data can be retrieved. But note: JTable requires several different components to function; TableModel is just one of them. Each has a default implementation that will create a working table, but you should at least be aware of what the components are. Look at Sun's Java Tutorial home page and go to the Swing Tutorial. It will walk you through the components of JTable.

Similar Threads

  1. Replies: 0
    Last Post: 11-14-2008, 05:14 AM
  2. Swing problem: JTable/TableModel
    By Levish2002 in forum AWT / Swing
    Replies: 2
    Last Post: 08-24-2008, 09:53 PM
  3. Create different instance of a tablemodel
    By Bill in forum AWT / Swing
    Replies: 6
    Last Post: 03-27-2008, 04:49 PM

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts