?
Solved

specific textField for int and floats

Posted on 2003-02-21
3
Medium Priority
?
253 Views
Last Modified: 2010-04-17
hi boys...

my question is that how can i specify a textfield for entering just int values or just float values or just Strings??

using java application can anyone give me an example code to help me.

NOTE: not using java swing.

thanks guys.
0
Comment
Question by:AliciaSV
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
3 Comments
 

Accepted Solution

by:
luisseixas earned 100 total points
ID: 7997407
I did it once and it went somethig like it:

Study every character that is inserted on the textfiel. There must be a JAVA routine for that.

For STRINGS, let it run free...

For INTEGERS, let only numbers be entered. If an "A" is entered, make Length(TEXT)=Length(TEXT)-1, e.g: Turn "123A" into "123" and write it on textfield.

For real numbers, let only 1 'point' be entered.
0
 

Expert Comment

by:CleanupPing
ID: 9447586
AliciaSV:
This old question needs to be finalized -- accept an answer, split points, or get a refund.  For information on your options, please click here-> http:/help/closing.jsp#1 
EXPERTS:
Post your closing recommendations!  No comment means you don't care.
0

Featured Post

Technology Partners: We Want Your Opinion!

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Entering a date in Microsoft Access can be tricky. A typo can cause month and day to be shuffled, entering the day only causes an error, as does entering, say, day 31 in June. This article shows how an inputmask supported by code can help the user a…
A short article about problems I had with the new location API and permissions in Marshmallow
In this fourth video of the Xpdf series, we discuss and demonstrate the PDFinfo utility, which retrieves the contents of a PDF's Info Dictionary, as well as some other information, including the page count. We show how to isolate the page count in a…
In this fifth video of the Xpdf series, we discuss and demonstrate the PDFdetach utility, which is able to list and, more importantly, extract attachments that are embedded in PDF files. It does this via a command line interface, making it suitable …

764 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question