how to clear the jtextfield in java

how to clear the jtextfield in java

clear jtextfield :

JButton b = new JButton("Click");
b.addActionListener(new ActionListener(){
    public void actionPerformed(ActionEvent e){
        textfield.setText("");
        //textfield.setText(null);
    }
});
So‮www:ecru‬.lautturi.com
Created Time:2017-09-03 07:41:18  Author:lautturi