public static Component createSeparator(){
  JPanel p=new JPanel();
  p.setLayout(new BorderLayout());
  JSeparator separator=new JSeparator(SwingConstants.HORIZONTAL);
  p.add(separator,BorderLayout.CENTER);
  Dimension size=new Dimension(FULL_WIDTH,5);
  p.setPreferredSize(size);
  return p;
}

public static Component createSeparator ( ) { JPanel p = new JPanel ( ) ; p . setLayout ( new BorderLayout ( ) ) ; JSeparator separator = new JSeparator ( SwingConstants . HORIZONTAL ) ; p . add ( separator , BorderLayout . CENTER ) ; Dimension size = new Dimension ( FULL_WIDTH , 5 ) ; p . setPreferredSize ( size ) ; return p ; }
creates a horizontal separator .
