Java Swing TitledBorder getBorder(String title)

Here you can find the source of getBorder(String title)

Description

get Border

License

Apache License

Declaration

public static Border getBorder(String title) 

Method Source Code

//package com.java2s;
//License from project: Apache License 

import javax.swing.BorderFactory;

import javax.swing.border.Border;
import javax.swing.border.EtchedBorder;

public class Main {
    public static Border getBorder(String title) {
        Border loweredetched = BorderFactory.createEtchedBorder(EtchedBorder.LOWERED);
        Border b1 = BorderFactory.createEmptyBorder(5, 5, 5, 5);
        Border b2 = BorderFactory.createTitledBorder(loweredetched, title);
        return BorderFactory.createCompoundBorder(b1, b2);
    }/*from   w w w .j a v a  2 s  . c  om*/
}

Related

  1. createTitledBorder(String title)
  2. createTitledBorder(String title)
  3. CreateTitledBorderwMargin(String title, int topMargin, int leftMargin, int bottomMargin, int rightMargin)
  4. createTitledPanelBorder(String title)
  5. formatTitle(TitledBorder titledBorder)
  6. getBorderInsetsForNoComponent(Border border)
  7. getCompoundBorder(String text)
  8. getTitledBorderHeight(Border border)
  9. getTitleLabelBorder()