How I would do this:

Start with the JTextField already containing your background text.

Add a focus listener to the JTextField, and when someone focuses on the JTextField, clear the default...