aspose file tools*
The moose likes Beginning Java and the fly likes limit input Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


Win a copy of EJB 3 in Action this week in the EJB and other Java EE Technologies forum!
JavaRanch » Java Forums » Java » Beginning Java
Bookmark "limit input" Watch "limit input" New topic
Author

limit input

mike cool
Greenhorn

Joined: Oct 21, 2005
Posts: 24
hi all
how can i force the user to enter limit input
the type is short
limit is 3 digit
so he can only enter 3 digit
thx in advance
Ernest Friedman-Hill
author and iconoclast
Marshal

Joined: Jul 08, 2003
Posts: 24166
    
  30

Command line? Swing? JSP?


[Jess in Action][AskingGoodQuestions]
mike cool
Greenhorn

Joined: Oct 21, 2005
Posts: 24
command line or swing or both
Ernest Friedman-Hill
author and iconoclast
Marshal

Joined: Jul 08, 2003
Posts: 24166
    
  30

Command line, the only choice is a loop like



In Swing, you could use JFormattedTextField.
mike cool
Greenhorn

Joined: Oct 21, 2005
Posts: 24
thanks that helps
i have other part that i can't solve
let say input will be 16485(short)
how can i converted to 3 decimal digits 0.170 ??
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: limit input
 
Similar Threads
Character by Character input
java.awt.TextField - limiting input size?
JavaScript+Regular Expression Problem
jQuery help
Setting a Range