Results 1 to 11 of 11
  1. #1
    iron_fist is offline Member
    Join Date
    Feb 2012
    Posts
    6
    Rep Power
    0

    Default need help with strings

    hi i have to take in an input from the user.
    i then have to find if the input contains a certain letter, if the letter is found in the string then the letter has to be drawn graphically
    anyone have any ideas thanks

  2. #2
    DarrylBurke's Avatar
    DarrylBurke is offline Forum Police
    Join Date
    Sep 2008
    Location
    Madgaon, Goa, India
    Posts
    11,458
    Rep Power
    20

    Default Re: need help with strings

    Does your question have anything to do with Applets?

    db
    If you're forever cleaning cobwebs, it's time to get rid of the spiders.

  3. #3
    iron_fist is offline Member
    Join Date
    Feb 2012
    Posts
    6
    Rep Power
    0

    Default Re: need help with strings

    yh i have to do this in an applet

  4. #4
    Norm's Avatar
    Norm is online now Moderator
    Join Date
    Jun 2008
    Location
    Eastern Florida
    Posts
    17,884
    Rep Power
    25

    Default Re: need help with strings

    Do you have any specific questions about
    how to get the the input from the user: a text field?
    how to search for a letter; See the String class's methods
    Or how to draw the letter: override a JPanel's paintComponent method.

  5. #5
    iron_fist is offline Member
    Join Date
    Feb 2012
    Posts
    6
    Rep Power
    0

    Default Re: need help with strings

    sorry if i may have confused people . I have to take text inputted in a text field, the text then has to be checked if the letter m occurs in the string, if the letter occurs in the string then the m has to be deleted from the string and then the the m has to be drawn graphically in it place

  6. #6
    Norm's Avatar
    Norm is online now Moderator
    Join Date
    Jun 2008
    Location
    Eastern Florida
    Posts
    17,884
    Rep Power
    25

    Default Re: need help with strings

    what code do you have? Do you have any specific questions?

  7. #7
    iron_fist is offline Member
    Join Date
    Feb 2012
    Posts
    6
    Rep Power
    0

    Default Re: need help with strings

    The only thing i have done is
    String search;
    search = e.getActionCommand();
    then this is sent to the paint method where the string is displayed
    eg
    if the string the user inputs is "damp" then the "m" has to be replaced a graphically drawn "m"

  8. #8
    Norm's Avatar
    Norm is online now Moderator
    Join Date
    Jun 2008
    Location
    Eastern Florida
    Posts
    17,884
    Rep Power
    25

    Default Re: need help with strings

    If you have any java programming questions please post them.

  9. #9
    iron_fist is offline Member
    Join Date
    Feb 2012
    Posts
    6
    Rep Power
    0

    Default Re: need help with strings

    yeah how can remove the letter m from a string in java

  10. #10
    Norm's Avatar
    Norm is online now Moderator
    Join Date
    Jun 2008
    Location
    Eastern Florida
    Posts
    17,884
    Rep Power
    25

    Default Re: need help with strings

    Look at the String class's API doc. It has many methods for working with Strings.
    Java Platform SE 6

  11. #11
    iron_fist is offline Member
    Join Date
    Feb 2012
    Posts
    6
    Rep Power
    0

Similar Threads

  1. Strings
    By leepikamukharji in forum New To Java
    Replies: 12
    Last Post: 04-18-2011, 02:43 PM
  2. Need help with Strings
    By </3java in forum New To Java
    Replies: 24
    Last Post: 02-17-2011, 06:00 PM
  3. Strings
    By zoala001 in forum Java Applets
    Replies: 9
    Last Post: 01-02-2011, 11:26 AM
  4. It is possible in Strings..?
    By mlibot in forum New To Java
    Replies: 1
    Last Post: 03-12-2010, 06:30 AM
  5. Strings as array help please..
    By crazygurl in forum New To Java
    Replies: 1
    Last Post: 12-01-2009, 09:23 PM

Posting Permissions

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