Win a copy of Java Mock Exams (software) this week in the Programmer Certification (OCPJP) forum!
  • Post Reply Bookmark Topic Watch Topic
  • New Topic

File Manipulation and JTable Class

 
Richard Mendoza
Ranch Hand
Posts: 48
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
I have created a file that contains five kinds of data namely prodcode, prodname, quantity, price and totalamount.
In my frame, I have a combo box that loads the prodcodes stored in the file. What I want is, if I have chosen a certain prodcode in the combo box, it should load the other details for that prodcode in the JTable.
Can somebody give me a sample code on how am I going to do it?
Please help....
Thanks!

Richard
 
Ajay Singhal
Ranch Hand
Posts: 37
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi,
i think you need to get your hands on java i/o.
FYI - parse the records into an array and pass it onto JTable. or create a model if you are familiar with and add records using model.
Ajay
 
Happiness is not a goal ... it's a by-product of a life well lived - Eleanor Roosevelt. Tiny ad:
the new thread boost feature: great for the advertiser and smooth for the coderanch user
https://coderanch.com/t/674455/Thread-Boost-feature
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!