title: BorderLayout showing border lines
body: <p>I am not very good in Java GUI and needs to seek help.</p>
  
  <p>I intend to add images at the west of my <code>BorderLayout</code>, center to be my contents and buttons at the bottom.</p>
  
  <p>I created an empty border to make some paddings between my south panel and my west and center panels. Now I just want to add a line across on top of the south border.</p>
  
  <p>As shown in the screenshot below, there's a line between the west panel and center panel as well, how can I remove that line and maintain the line across on top of the south panel?</p>
  
  <p>Attached is my code:</p>
  
  <p><img src="https://i.stack.imgur.com/yW85H.png" alt="enter image description here"></p>
  
  <pre><code>import java.awt.BorderLayout;
  import java.awt.FlowLayout;
  import javax.swing.BorderFactory;
  import javax.swing.JFrame;
  import javax.swing.JLabel;
  import javax.swing.JPanel;
  
  public class test {
      public static void main(String[] args) { 
  
          JPanel panel1 = new JPanel(new BorderLayout());
          JPanel panel2 = new JPanel(new FlowLayout());
          JPanel panel3 = new JPanel(new FlowLayout());
          JPanel panel4 = new JPanel(new FlowLayout());
  
          JFrame frame = new JFrame();
  
          panel2.add( new JLabel( "WEST &lt;will be adding image here&gt;" ));
          panel3.add( new JLabel( "CENTER &lt;contents&gt;"));  
          panel4.add( new JLabel( "SOUTH &lt;will be adding buttons&gt;" ));
  
          panel1.add(panel2, BorderLayout.WEST);
          panel1.add(panel3, BorderLayout.CENTER);
          panel1.add(panel4, BorderLayout.SOUTH);
  
          panel2.setBorder(BorderFactory.createRaisedBevelBorder());
          panel3.setBorder(BorderFactory.createRaisedBevelBorder());      
          panel4.setBorder(BorderFactory.createEmptyBorder(10,10,10,10));
  
          frame.add(panel1); 
          frame.setDefaultCloseOperation(JFrame.DISPOSE_ON_CLOSE);
          frame.pack();
          frame.setSize(510,390);
          frame.setLocationRelativeTo(null);
          frame.setVisible(true);
          frame.setResizable(false);
      }
  }
  </code></pre>