Textfield Invisible Java

public class AddressPanel {

    private JTextField textFieldToHide;

    public void hideTextField(){
        textFieldToHide.setVisible(false);
    }
}
Enthusiastic Elephant