JPanel treePanel = new JPanel(new FlowLayout(FlowLayout.LEFT));
treePanel.setOpaque(false);
- JvSwingUtils.createItalicTitledBorder(treePanel,
+ JvSwingUtils.createTitledBorder(treePanel,
MessageManager.getString("label.tree"), true);
// then copy the inset dimensions for the border-less PCA panel
/**
* Adds a titled border to the component in the default font and position (top
- * left)
+ * left), optionally witht italic text
*
* @param comp
* @param title
+ * @param italic
*/
- public static void createItalicTitledBorder(JComponent comp,
+ public static TitledBorder createTitledBorder(JComponent comp,
String title, boolean italic)
{
Font font = comp.getFont();
title, TitledBorder.LEADING, TitledBorder.DEFAULT_POSITION,
font);
comp.setBorder(titledBorder);
+
+ return titledBorder;
}
}