Java Swing TitledBorder setBorder(Container panel, String title)

Here you can find the source of setBorder(Container panel, String title)

Description

set Border

License

Open Source License

Declaration

static void setBorder(Container panel, String title) 

Method Source Code

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

import java.awt.Container;

import javax.swing.BorderFactory;

import javax.swing.JPanel;

public class Main {
    static void setBorder(Container panel, String title) {
        if (panel instanceof JPanel) {
            ((JPanel) panel).setBorder(BorderFactory.createTitledBorder(title));
        }/*from w ww  .j a v  a  2  s  .c o  m*/

    }
}

Related

  1. getTitleLabelBorder()
  2. makeBorderedPanel(String borderTitle)
  3. makeTitledBorder(String title)
  4. myBorder(String title)
  5. setBoldTitledBorder(String title, JComponent p)
  6. setBorder(JComponent component, String text, int titleJustification)
  7. setLabelBorder(String label, JComponent c)
  8. setPanelBorder(final JPanel p, final String s)
  9. setTitleBorder(JComponent pane, String title)