问题
I am making a game, and i want a place where users can fill out a form suggesting ideas or bugs, but want it to look similar to the rest of the game graphics/buttons etc.. I dont know how to make custom TextFields with pictures. I want the end result to look like this:

So Can anyone tell me how to easily format a JTextFeild with an image icon or something.
Thanks
回答1:
What is custom about that? Are you talking about:
no borders, then just use setBorder(null);
semi-transparent look, then use
setBackground( new Color(...) );
- read the Color API for the way to create transparent colors. Also you will need to check out Backgrounds With Transparency since you can't just use a transparent background directly.
I can't tell if there are any other differences.
来源:https://stackoverflow.com/questions/19919554/java-textfield-custom-picture-look