I am trying to use setPromptText on username
TextField username = new TextField();
username.setPromptText("enter your name");
I don't know why setPromptText is disabled. NetBeans shows a red underline on it and doesn't recognize this code and says
Cannot find symbol symbol: method setPromptText(String)
Is there anything that I'm missing? I have the related Swing libraries imported. Is there anything else spacial that I need to import?