• Post Reply Bookmark Topic Watch Topic
  • New Topic

get ID and show details  RSS feed

 
sajjad Hhh
Greenhorn
Posts: 3
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
i want to get ID number and display details.
my "SearchFile.txt" file is here:



when i use scanner class for get id number,and console window for display details , all things is good and perfect. but when i use a jtextfield for get id and a jlable for display detail information, program find just last record in file and not find other records.

my code is here:



I an new in java and coderanch,
please help!
 
Tony Docherty
Bartender
Posts: 3268
82
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Welcome to the Ranch.

When using code tags remember to highlight the code before clicking the 'Code' button. I've adjusted the tags for you this time.
 
Tony Docherty
Bartender
Posts: 3268
82
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Please post the code you are running - this code contains typos so can't be your actual code.

I'm not 100% sure what your problem is as your code doesn't show any values from a JTable and what is the display detail information?
Can you give more details please.

BTW why are you converting the value returned from the text field to an int and then converting it back to a String later on?
 
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!