Results 1 to 2 of 2
  1. #1
    elizabeth is offline Member
    Join Date
    Jul 2007
    Posts
    40
    Rep Power
    0

    Default Clean the content of the JTextField

    I have a JFrame that has some JTextFields. I need to clear all the JTextField when I click on Jbutton. How can I do that? I don't want to clear them one by one.
    Any ideas?
    I need your help
    :o

    Thanks

  2. #2
    levent Guest

    Default

    :) You need to clear them one by one.. Just call setText("") method for each of the textfields you have from the click event handling code of your JButton. There is no other way for this. ;)

Similar Threads

  1. jTextField Simpe Addition - how to ? - Netbeans 6.0
    By jesicapalma in forum NetBeans
    Replies: 4
    Last Post: 05-24-2010, 10:21 AM
  2. how to focus to another JTextfield?
    By birdofprey in forum AWT / Swing
    Replies: 2
    Last Post: 04-09-2008, 02:08 PM
  3. Using Columns With JTextField
    By The Evil Genius in forum AWT / Swing
    Replies: 1
    Last Post: 03-17-2008, 02:01 AM
  4. help with JTextfield
    By gary in forum New To Java
    Replies: 4
    Last Post: 07-11-2007, 02:58 PM
  5. Replies: 1
    Last Post: 05-20-2007, 12:19 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
  •