Background « JTextField « Java Swing Q&A





1. How set a translucid background color on jtextfield?    stackoverflow.com

I have a snippet that change the color of a JTextField :

textField.setBackground(new Color(155, 0, 0, 155));
When the color is changing, the component has a strange behaviour: the cursor twinkling becomes not ...

2. JTextField background color on enable/disable    stackoverflow.com

i changed the background color of my JTextField to black when it is disabled. I do this using the UIManager and this property TextField.disabledBackground, that i set at application start ...

3. textfield background    coderanch.com

Can you post your code? I tried to recreate the problem you described based off your description, and it didn't happen... the applet has a red background, but the textfield still has a white background... Also, could you say what platform and version of Java you are working with? I remember a similiar problem I had at one point with AWT ...