Win a copy of TDD for a Shopping Website LiveProject this week in the Testing forum!
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other Pie Elite all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Paul Clapham
  • Ron McLeod
  • Jeanne Boyarsky
  • Tim Cooke
Sheriffs:
  • Liutauras Vilda
  • paul wheaton
  • Henry Wong
Saloon Keepers:
  • Tim Moores
  • Tim Holloway
  • Stephan van Hulst
  • Carey Brown
  • Frits Walraven
Bartenders:
  • Piet Souris
  • Himai Minh

JTable Problem

 
Greenhorn
Posts: 3
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
I am so frustrated with my project, it is due in a few days and I have only one last goal to achieve and I cannot do it because I'm not a great programmer.
So I created a cardlayout with Netbeans GUI builder and the fourth card has a JTable, I populated the jTable with the builder as well, by right clicking going to table contents and modifying them. The problem is that, i want only one of the columns to be editable (achieved it) and it should save the edited cells after the program is closed/or through a save button (CANNOT ACHIEVE THIS ). I have spent a lot of time on this and I am still failing. This is my code, please help me on how to fix this and yes i know the gui builder isnt the best way to learn but i had time constraints.


CODE:








 
Bartender
Posts: 5167
11
Netbeans IDE Opera Java
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Rob Camick's Table Stop Editing may be useful.
 
Krater Mitch
Greenhorn
Posts: 3
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator

Darryl Burke wrote:Rob Camick's Table Stop Editing may be useful.



um that is not what i meant, i meant the data just has to be updated the next time the user runs the application. (meaning they do hit the enter key). its just that in my case it dosent show the changes the next time i open the app
 
Rancher
Posts: 3262
30
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
I don't see any "Save" code where you attempt to save the data so it can be restored the next time you start the application.

So I guess that would be your problem.
 
Krater Mitch
Greenhorn
Posts: 3
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator

Rob Camick wrote:I don't see any "Save" code where you attempt to save the data so it can be restored the next time you start the application.

So I guess that would be your problem.



how would i go around to fix this??
 
Oh. Hi guys! Look at this tiny ad:
free, earth-friendly heat - a kickstarter for putting coin in your pocket while saving the earth
https://coderanch.com/t/751654/free-earth-friendly-heat-kickstarter
reply
    Bookmark Topic Watch Topic
  • New Topic