Code example for TitledBorder

0
    private JComponent a() {
        JPanel jpanel = new JPanel(new BorderLayout());
 
        jpanel.add(new GuiStatsComponent(this.c), "North");
        jpanel.add(this.b(), "Center");
        jpanel.setBorder(new TitledBorder(new EtchedBorder(), "Stats"));
        return jpanel;
    } 
 
    private JComponent b() {
        PlayerListBox playerlistbox = new PlayerListBox(this.c);
        JScrollPane jscrollpane = new JScrollPane(playerlistbox, 22, 30);
 
        jscrollpane.setBorder(new TitledBorder(new EtchedBorder(), "Players"));
        return jscrollpane;
    } 
 
    private JComponent c() {
        JPanel jpanel = new JPanel(new BorderLayout());
        JTextArea jtextarea = new JTextArea();