title: How to set padding at JLabel
body: <p>I want to display a Multiline JLabel into JPanel.
  So I have this code but I'm not able to show the multiline JLabel.</p>
  
  <pre><code>public class NotificationFrame extends JFrame{
      public NotificationFrame(){
          JPanel panelBody = new JPanel();
          panelBody.setBackground(Color.white);
          GridBagConstraints GBC2 = new GridBagConstraints();
          Container CR2 = new Container();
          GridBagLayout GBL2 = new GridBagLayout();
          CR2.setLayout(GBL2);     
          panelBody.add(CR2);
  
          GBC2 = new GridBagConstraints();
          CR2.add(labelTesto);
          GBC2.gridx=0;
          GBC2.gridy=0;
          GBC2.insets.left = 10;
          GBC2.insets.top=0;
          GBL2.setConstraints(labelTesto,GBC2);
          panelBody.setLayout(new FlowLayout(FlowLayout.CENTER)); 
  
  
          add(panelBody,BorderLayout.CENTER);
      }
  }
  </code></pre>
  
  <p>If I change the last line of code in</p>
  
  <pre><code>add(labelTest,BorderLayout.CENTER);
  </code></pre>
  
  <p>I can show that I want. But it is not correct because I want to set a padding on JLabel</p>
  
  <blockquote>
    <p>EDIT</p>
  </blockquote>
  
  <p>I have use this code now:</p>
  
  <pre><code>JPanel panelBody = new JPanel();
  panelBody.setBackground(Color.white);
  SpringLayout layout = new SpringLayout();
  panelBody.setLayout(layout);
  panelBody.add(labelTesto);
  layout.putConstraint(SpringLayout.NORTH, labelTesto, 15, SpringLayout.NORTH, panelBody);
  add(panelBody,BorderLayout.CENTER);
  </code></pre>
  
  <p>This is the layout:</p>
  
  <p><a href="https://i.stack.imgur.com/87pz3.jpg" rel="noreferrer"><img src="https://i.stack.imgur.com/87pz3.jpg" alt="enter image description here"></a></p>
  
  <p>This is the all test that I should see: 
  "Il 31 Dicembre scadrà l'assistenza, ricorda di rinnovare l'assistenza per ricevere sempre assistenza ed aggiornamenti."</p>