Welcome to the Java Programming Forums

The professional, friendly Java community. 21,500 members and growing!

The Java Programming Forums are a community of Java programmers from all around the World. Our members have a wide range of skills and they all have one thing in common: A passion to learn and code Java. We invite beginner Java programmers right through to Java professionals to post here and share your knowledge. Become a part of the community, help others, expand your knowledge of Java and enjoy talking with like minded people. Registration is quick and best of all free. We look forward to meeting you.


Members have full access to the forums. Advertisements are removed for registered users.

Results 1 to 2 of 2

Thread: simple gui to check if text is a palindrome

  1. #1
    Junior Member
    Join Date
    May 2013
    Thanked 1 Time in 1 Post

    Default simple gui to check if text is a palindrome

    in dis simple gui iam reading in the text from textfield tf and displaying the result in textfield trf.
    the problem iam facing is quite amusing actually,when i run the gui for the 1st time,i get the correct output,ie if my text is say 'madam' i get the output saying 'madam is a palindrome'
    i use the 'refresh' button to clear both fields .
    when i give the input text,the second time,irrespective of my input,i keep getting the output dat entered text is a palindrome.
    i set the input string 'in' to null after i completed the process of checking for a palindrome.
    but that dosent seem to help either.
    Attached Files Attached Files

  2. #2
    Crazy Cat Lady KevinWorkman's Avatar
    Join Date
    Oct 2010
    Washington, DC
    My Mood
    Thanked 636 Times in 540 Posts

    Default Re: simple gui to check if text is a palindrome

    Please see the link in my signature on asking questions the smart way (particularly the parts about using proper spelling and grammar) then post an SSCCE (not an attachment), and we'll go from there.
    Useful links: How to Ask Questions the Smart Way | Use Code Tags | Java Tutorials
    Static Void Games - Play indie games, learn from game tutorials and source code, upload your own games!

Similar Threads

  1. Text output in GUI
    By andreas81 in forum Java Theory & Questions
    Replies: 4
    Last Post: June 26th, 2013, 09:36 AM
  2. Parsing from a GUI text field
    By jdubicki in forum AWT / Java Swing
    Replies: 6
    Last Post: May 17th, 2012, 03:46 PM
  3. Adding entered text from one GUI to another
    By fride360 in forum What's Wrong With My Code?
    Replies: 0
    Last Post: March 24th, 2011, 01:08 PM
  4. Check for palindrome numbers
    By SnooSnoo in forum What's Wrong With My Code?
    Replies: 7
    Last Post: March 4th, 2010, 06:11 PM