i have a Jtable which i use only for display. i.e. no listeners etc. I put it on a JPanel.
i have another class which extends JFrame and i put all the buttons there. there is also the table with the loaded values from file.
the problem is that when i change the values i have to restart the program for the values to be seen,
any help on refreshing the panel when the user clicks on refresh?
Without seeing your code its hard to guess what you are doing, but I will guess that your problem is that you are creating a new JTable when you are attempting to refresh the data. This is the wrong approach. The solution is to create a new TableModel and add it to the existing table. Something like:
you have a file
your program reads this file and displays the data in a JTable
you change the contents of the file, but not via your program.
you want the changes reflected in the JTable
is this correct so far?
With a little knowledge, a cast iron skillet is non-stick and lasts a lifetime.