Java Swing TitledBorder setBorder(JComponent component, String text, int titleJustification)

Here you can find the source of setBorder(JComponent component, String text, int titleJustification)

Description

set Border

License

LGPL

Declaration

public static void setBorder(JComponent component, String text, int titleJustification) 

Method Source Code

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

import javax.swing.BorderFactory;
import javax.swing.JComponent;

import javax.swing.border.TitledBorder;

public class Main {
    public static void setBorder(JComponent component, String text, int titleJustification) {
        component.setBorder(BorderFactory.createTitledBorder(BorderFactory.createEtchedBorder(), text,
                titleJustification, TitledBorder.TOP));
    }/*  w  ww .jav a  2  s.  c om*/
}

Related

  1. makeBorderedPanel(String borderTitle)
  2. makeTitledBorder(String title)
  3. myBorder(String title)
  4. setBoldTitledBorder(String title, JComponent p)
  5. setBorder(Container panel, String title)
  6. setLabelBorder(String label, JComponent c)
  7. setPanelBorder(final JPanel p, final String s)
  8. setTitleBorder(JComponent pane, String title)
  9. titledBorder(String title, B comp)