JComponent c = (JComponent)this._component;
Border border = c.getBorder();
if ((border == null) || (border instanceof EmptyBorder)) {
// TF:18/09/2009:Corrected this to use a GridTitledBorder, which better understands
// how to handle frame weights and frame colours
GridTitledBorder gtb = new GridTitledBorder();
gtb.setFrameWeight(Constants.W_NONE);
gtb.setFrameColor(UIutils.forteToJavaColor(color));
c.setBorder(gtb);
// c.setBorder(new LineBorderWithColour(UIutils.forteToJavaColor(color)));
}
else if ((border != null) && (border instanceof GridTitledBorder)) {
// TF:6/9/07:Added the functionality to use the GridTitledBorder for proper behaviour
GridTitledBorder gridBorder = (GridTitledBorder)border;
gridBorder.setFrameColor(UIutils.forteToJavaColor(color));
c.repaint();
}
else if ((border != null) && (border instanceof TitledBorder))
{
TitledBorder titledBorder = (TitledBorder)border;