title: Border with equal sizes on all 4 sides of JTextpane
body: <p>I am setting a <code>createLineborder</code> to my <code>JTextPane</code>. But the border lines are little different in right-end and bottom of <code>JTextpane</code> when compared to Left-end and top of <code>TextPane</code>. I searched in net and I found that it is the default behavior of <code>lineborder</code>. So can anyone please tell me that is there any border which gives equal lines sizes in all 4 sides?</p>
  
  <p>Hi I cannot put my code as it is very huge. So just putting a sample code here.
  JPanel panel;
      JTextPane pane;</p>
  
  <pre><code>public BorderedTextPane() {
      // TODO Auto-generated constructor stub
      pane = new JTextPane();
      panel = new JPanel(null);
      JPanel innerPanel = new JPanel(null);
      innerPanel.setBounds(50,50,300,400);
      pane.setBorder(BorderFactory.createLineBorder(Color.BLACK));
      pane.setSize(new Dimension(innerPanel.getWidth(),innerPanel.getHeight()));
      innerPanel.add(pane);
      panel.add(innerPanel);
      add(panel);
      setVisible(true);
      setSize(new Dimension(500,500));
      setLocationRelativeTo(null);
  }
  </code></pre>
  
  <p>This could be clearly seen if you zoom the textpane or when you save it on a file. Below image would explain it in better way. Compare the left and right lines.
      <img src="https://i.stack.imgur.com/tsUYh.png" alt="enter image description here"></p>