Java Swing TitledBorder createTitledBorder(String label)

Here you can find the source of createTitledBorder(String label)

Description

create Titled Border

License

Open Source License

Declaration

public static Border createTitledBorder(String label) 

Method Source Code


//package com.java2s;
//License from project: Open Source License 

import java.awt.Color;
import java.awt.Font;

import javax.swing.BorderFactory;

import javax.swing.border.Border;
import javax.swing.border.TitledBorder;

public class Main {
    private static Border lineBorder = BorderFactory.createLineBorder(Color.BLUE, 3);
    private static Font borderFont = new Font("Verdana", Font.BOLD, 20);

    public static Border createTitledBorder(String label) {
        TitledBorder border = BorderFactory.createTitledBorder(lineBorder, label);
        border.setTitleFont(borderFont);
        return border;
    }//from   www .java 2  s.  co m
}

Related

  1. createGuiElementBorder(final String title)
  2. createInsetTitledBorder(String title)
  3. createStyleAttributeBorder(String title)
  4. createTitleBorder(final String title)
  5. createTitledBorder(final String title)
  6. createTitledBorder(String name)
  7. createTitledBorder(String title)
  8. createTitledBorder(String title)
  9. CreateTitledBorderwMargin(String title, int topMargin, int leftMargin, int bottomMargin, int rightMargin)