title: how to Put JLabel text over a JTextField
body: <p>how to add a JLabel simple text over/above a JTextField.
  I tried many commands as you can see in my code but nothings works.</p>
  
  <p>this is a snapshot of my code </p>
  
  <pre><code>private JPanel createTextPanel() {
          int panelWidth = PANEL_SIZE.width;
          int panelHeight =  PANEL_SIZE.height/3;
          Dimension panelSize = new Dimension(panelWidth,panelHeight);
          JPanel textPanel = new JPanel();
          textPanel.setPreferredSize(panelSize);
          //textPanel.setLayout(null);
          /* Add text */
          JLabel Text_RED = new JLabel();
          Text_RED.setText("Red");
          //Text_RED = new JLabel("\nRED\n");
          //Text_RED.setHorizontalTextPosition(SwingConstants.TOP);
          //Text_RED.setVerticalAlignment(SwingConstants.TOP);
          Red = new JTextField(3);
          //Red.setVerticalAlignment(JTextField.TRAILING );
          Red.setLocation(100,100);
  
          //Red.setLocation(50, 50);
          JLabel Text_Green = new JLabel("Green");
          Green = new JTextField(3);
  
          JLabel Text_Blue = new JLabel("Blue");
          Blue = new JTextField(3);
  
          //setLayout(new GridLayout(2,2,10,10));
          textPanel.add(Text_RED);
          textPanel.add(Red);
  
          textPanel.add(Text_Green);
          textPanel.add(Green);
  
          textPanel.add(Text_Blue);
          textPanel.add(Blue);
  
          return textPanel;
      }
  </code></pre>