aspose file tools*
The moose likes Developer Certification (SCJD/OCMJD) and the fly likes urlyBird 1.2.3 - customer holding record Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


Win a copy of Java 8 in Action this week in the Java 8 forum!
JavaRanch » Java Forums » Certification » Developer Certification (SCJD/OCMJD)
Bookmark "urlyBird 1.2.3 - customer holding record" Watch "urlyBird 1.2.3 - customer holding record" New topic
Author

urlyBird 1.2.3 - customer holding record

Payal Shah
Ranch Hand

Joined: Jul 10, 2006
Posts: 67
For my gui , i have a text box , where use can enter the customer id number.

The spec says it should be 8 digit number?

I am guessing then it should be between 0 through 9 and legth = 8..

I was thinking about doing some kind of screen validation.. extends the Jtextfield and create my custom textfield class..it is out of scope for this exam?

thank you.
Jeffry Kristianto Yanuar
Ranch Hand

Joined: Oct 01, 2007
Posts: 759
Payal Shah wrote:

I was thinking about doing some kind of screen validation.. extends the Jtextfield and create my custom textfield class..it is out of scope for this exam?



Either way, just document your decision. I didn't implement that mechanism.

Jeffry Kristianto Yanuar (Java Instructor) SCJP 5.0, SCJA, SCJD (UrlyBird 1.3.2)
Roberto Perillo
Bartender

Joined: Dec 28, 2007
Posts: 2247

I did implement it. I have a JTextField, where the user can only insert numbers from 0 to 9, and only up to 8 numbers.


Cheers, Bob "John Lennon" Perillo
SCJP, SCWCD, SCJD, SCBCD - Daileon: A Tool for Enabling Domain Annotations
Payal Shah
Ranch Hand

Joined: Jul 10, 2006
Posts: 67
Thank you Jeffry and Roberto.


regards,
Payal
Alexandre Baldo
Ranch Hand

Joined: Aug 04, 2006
Posts: 48

...extends the Jtextfield and create my custom textfield class..it is out of scope for this exam?


But to do this you don't have to extend JTextField.
You could use javax.swing.text.MaskFormatter:



(The '#' means that just numbers can be inserted).

And than, use it with a JFormattedTextField.


...ops!<br>-----------------<br>
SCJD<br>
SCWCD 1.4<br>
SCJP 1.4
Payal Shah
Ranch Hand

Joined: Jul 10, 2006
Posts: 67
hi Alexandre,

Ya. that's what i was thinking. I saw the example in Andrew's book. I am gona try it out.

thank you so much for your reply..


Regards,
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: urlyBird 1.2.3 - customer holding record
 
Similar Threads
When assessor introduce a new requirement?
NX: Customer number: numeric, or alpha-numeric ok?
leading zeroes, customer reference number
Customer ID: strictly 8 digits?
customer id = exactly 8 digits?