Results 1 to 2 of 2
  1. #1
    derekmski is offline Member
    Join Date
    Apr 2011
    Rep Power

    Default Writing a java applet that converts numbers to words

    I need help to design and write an applet that searches for single-digit numbers in a TextField and changes them to their corresponding words displayed in a TextArea. For example, the string “4 score and 7 years ago” would be converted into “four score and seven years ago”.

    Add in the functionality that would accept multiple-digit numbers and change them similar to this example: “A baseball game has 27 outs!” would be changed to “A baseball game has two-seven outs!”

    I have an example picture of how I would like it to look.
    Attached Thumbnails Attached Thumbnails Writing a java applet that converts numbers to words-java-applet-design.jpg  

  2. #2
    ra4king's Avatar
    ra4king is offline Senior Member
    Join Date
    Apr 2011
    Atlanta, Georgia, US
    Rep Power


    This is basic String parsing. Just check for a number and replace with the appropriate word.

Similar Threads

  1. new to java, converting words into numbers
    By echo33 in forum New To Java
    Replies: 4
    Last Post: 04-22-2009, 09:52 AM
  2. Reading/Writing files through Applet
    By Java Tip in forum Java Tip
    Replies: 0
    Last Post: 12-15-2007, 09:20 PM
  3. Converts from Fahrenheit to Celsius
    By trill in forum New To Java
    Replies: 1
    Last Post: 08-06-2007, 05:52 AM
  4. Converts a binary number to a decimal
    By cachi in forum New To Java
    Replies: 1
    Last Post: 08-01-2007, 09:57 AM
  5. Aspose.Words for Java -
    By levent in forum Java Software
    Replies: 0
    Last Post: 05-24-2007, 10:08 AM

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts