How do I make a textfield, that is editable, but invisible? I need to give parameters to my program, but I don't want the users to see what they are actually putting into the input. If I set it to invisible, I can't edit it's contents either. I tried making it transparent like this: Making a JButton invisible, but clickable? but for some reason, the textfield still shows. I also tried using layeredpanes, but I can only put the textfield on top of them, not the other way, NetBeans just moves them around, so everything fit.
I'm open to other ideas, the input is a string followed by an "enter".
I think I asked the question wrong. The problem isn't that the text is visible, but the whole text field is visible. The input is a string from the barcode reader, so nothing needed to be shown at all.
EDIT: We solved it in a different way. We added a white line to the top of the background image, put the textfield there, and changed every of it's colours to white.