This week's book giveaway is in the Agile and Other Processes forum. We're giving away four copies of Darcy DeClute's Scrum Master Certification Guide: The Definitive Resource for Passing the CSM and PSM Exams and have Darcy DeClute on-line! See this thread for details.
I have created JTable which reads the data from a File using FileChooser. The only thing which is working for me is that I have to ask user at command prompt to choose the file which has data. Once they choose the file I am able to show the Table in a frame with and a menu i am using the AbstractTableModel and a Vector to store the column headings and data in Vectors from file. What I want to do is Open a frame with buttons and menu and empty table and when user clicks on menu's open option to open desired file then show the data in Table. After that when user does any changes I will chack and again user can save the data in a file using FileChooser. This is working for me. Only place I need help is how to show the empty table and then fill the coulmn of tables from file data. Thanks.
Thanks a lot. I was afraid that I will have to do this. But finally I did that. Now its working except few things. Should I use firetableDataChanged() somewhere. 2) I had a scrollbar in the frame. Now that Scrolbar does not show up if the number of rows are more then the area defined. This was initially where MyTableModel is the AbstractTableModel MyTableModel myModel = new MyTableModel(); JTable table = new JTable(myModel); table.setPreferredScrollableViewportSize(new Dimension(700,150)); JScrollPane scrol = new JScrollPane(table); getContentPane().add(scrol,BorderLayout.CENTER);
After the values are changed I am using new MyTableModel(); repaint(); Thanks.
What do you have in that there bucket? It wouldn't be a tiny ad by any chance ...
a bit of art, as a gift, the permaculture playing cards