Win a copy of The Little Book of Impediments (e-book only) this week in the Agile and Other Processes forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

question about the Book function

 
Jofer Chan
Ranch Hand
Posts: 49
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi,everyoue:
Sorry my english.
in the client,need to a new frame for the Book,
which are the input field for the Book?
another question:
which is the method to implement the update of the RandomAccessFile Object?
 
Nicholas Cheung
Ranch Hand
Posts: 4982
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi,

in the client,need to a new frame for the Book,
which are the input field for the Book?

In my implementation, when the user clicks the "book" button, another frame will be popped up, which contains a text field, a OK button and a Cancel button.
After the user types in the owner id, and press OK. The parent frame will be noticed and send the request to the server, and this pop up window disposed.

which is the method to implement the update of the RandomAccessFile Object?

RandomAccessFile directly updates the content of the data. Whenever you call write(), it really writes to the file.
If you use java.nio.channel.FileChannel, you may discover that, if you not call the force(boolean) function, updates are kept in the ByteBuffer.
Hope this help.
Nick
 
Jofer Chan
Ranch Hand
Posts: 49
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi,Nicholas
Thank you.
your reply is great.
thank you very much!!!
 
Terry Martinson
Ranch Hand
Posts: 293
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
My implementation is a little different than this, but basically does the same thing.
I provide both a customer id entry field and the book button on the main client screen. My thoughts were that this would save the user keystrokes because they could enter the customer id and then press the book button and be done with it. (I also have validation to make sure that if they press the book button, they have both selected a record and enterer a customer id.)
I would hope that either way of handling the customer id entry would be considered fine by the graders. Especially since we don't have clear specs on this matter.
TJ
 
Jofer Chan
Ranch Hand
Posts: 49
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
hi,Terry:
thank you.
your implement is good!
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic