Question: I'm working on a log in server & my `JTextFields` aren't transparent when I set Opaque to `false`.

My code:

```
//username  
    JTextField jUsername = new JTextField(10);  
    jUsername.setBounds(520, 284, 190, 25);  
    jUsername.setOpaque(false);  
    jUsername.setBorder(null);  
    getContentPane().add(jUsername);  

    //password  
    JTextField jPassword = new JTextField(15);  
    jPassword.setBounds(520, 374, 190, 25);  
    jPassword.setOpaque(false);  
    jPassword.setBorder(null); 
    //jPassword.setBackground(new Color(Color.TRANSLUCENT));
    getContentPane().add(jPassword);

```

An Image what is still happening:

![enter image description here](https://i.stack.imgur.com/2scA5.jpg)

Anyone ever seen this before or know how to fix it? I've looked around but no one had the same problem as I do, & the fixes for theirs didn't work for mine. ( I Know I'm not using `JPasswordField` for password, that's temporary )

Answer: 
no idea what you tried, for better help sooner post an [SSCCE](http://sscce.org/), short. runnable, compilable with setBackground instead of Image

![enter image description here](https://i.stack.imgur.com/fKOLQ.jpg)

```
import java.awt.*;
import javax.swing.*;
import javax.swing.text.*;

public class LabelImageText extends JPanel {

    private static final long serialVersionUID = 1L;

    public LabelImageText() {
        JTextField jUsername = new JTextField(10);
        jUsername.setText("MyText");
        jUsername.setOpaque(false);
        //jUsername.setBorder(null);
        add(jUsername);
        JTextField jPassword = new JTextField(15);
        jPassword.setText("MyText");
        jPassword.setOpaque(false);
        //jPassword.setBorder(null);
        add(jPassword);
        setBackground(Color.RED);
    }

    private static void createAndShowUI() {
        JFrame frame = new JFrame("set Opaque");
        frame.setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE);
        frame.add(new LabelImageText());
        frame.pack();
        frame.setLocationRelativeTo(null);
        frame.setVisible(true);
    }

    public static void main(String[] args) {
        EventQueue.invokeLater(new Runnable() {
            @Override
            public void run() {
                createAndShowUI();
            }
        });
    }
}

```
I tried with another option and it worked for me. 

You can modify the property `Background` of the `textfield`. Select the option custom code in the Selection Box and paste `new Color(0, 0, 0, 0)`in the `txtField.setBackground` property.

Then just change the border property to `No border`. and finally uncheck the `opaque` checkbox.

[Here a capture of my netbeans interface](http://i.stack.imgur.com/ZJfnD.png)