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

    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


  2. #2
    levent Guest


    :) 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, 09:21 AM
  2. how to focus to another JTextfield?
    By birdofprey in forum AWT / Swing
    Replies: 2
    Last Post: 04-09-2008, 01: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, 01:58 PM
  5. Replies: 1
    Last Post: 05-20-2007, 11:19 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