Here you can find the source of setPanelBorder(final JPanel p, final String s)
Parameter | Description |
---|---|
p | panel |
s | string |
public static void setPanelBorder(final JPanel p, final String s)
//package com.java2s; //License from project: Open Source License import javax.swing.BorderFactory; import javax.swing.JPanel; public class Main { /**// w w w. jav a 2 s .com * Set Border of JPanel. * @param p panel * @param s string */ public static void setPanelBorder(final JPanel p, final String s) { p.setBorder(BorderFactory.createCompoundBorder(BorderFactory.createTitledBorder(s), BorderFactory.createEmptyBorder(5, 5, 5, 5))); } }