This week's book giveaway is in the JavaScript forum.
We're giving away four copies of Cross-Platform Desktop Applications: Using Node, Electron, and NW.js and have Paul Jensen on-line!
See this thread for details.
Win a copy of Cross-Platform Desktop Applications: Using Node, Electron, and NW.js this week in the JavaScript forum!
  • Post Reply Bookmark Topic Watch Topic
  • New Topic

writing user input to a random access file  RSS feed

 
kiran1
Greenhorn
Posts: 1
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hello, I am trying to take user input (customer info such as name, address, phone number , etc. from many text fields - use enter to go to next text field as they are set up in a grid layout). This is done in one class and when you click the "Save" button in the frame I want to write this information to a random access file. Do I do this in the same class or do I need to create a new class for this and, if so, how do I keep track of the user input from the frame in this new class? I also do not want to allow duplicate names to be entered. I know about DataInputStream and FileInputStream and System.in but am confused as to how I go about starting all of this and putting it all together?? Any help would be greatly appreciated as I am fairly new to Java!
 
Frank Carver
Sheriff
Posts: 6920
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
"kiran1",
The Java Ranch has thousands of visitors every week, many with surprisingly similar names. To avoid confusion we have a naming convention, described at http://www.javaranch.com/name.jsp . We require names to have at least two words, separated by a space, and strongly recommend that you use your full real name. Please log in with a new name which meets the requirements.
Thanks.
 
With a little knowledge, a cast iron skillet is non-stick and lasts a lifetime.
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!