I wanted to add a text prompt for my JFormattedTextField and I searched it on google on how I could do this. I got a lot of hits for the following code below but when I put it into my code in eclipse it doesn't recognize any of it. Can someone tell me why?
Here are two possible ways to add a text prompt:
PromptSupport.setPrompt("prompt", textComponent);
TextPrompt p = new TextPrompt("text", textComponent);
I got it from the following link: How to display a default message in JTextField java