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
Printable View
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
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.