((TitledBorder) border).setTitle("");
}
} else {
if (pCaption != null) {
// TitledBorder tb = BorderFactory.createTitledBorder(border, caption.toString(), TitledBorder.LEFT, TitledBorder.TOP);
TitledBorder tb = new GridTitledBorder(border, caption.toString(), TitledBorder.LEFT, TitledBorder.TOP);
if (this.captionFont != null) {
tb.setTitleFont(this.captionFont);
}
setBorder(tb);
}
}
} else {
GridTitledBorder gridBorder;
if (pCaption != null) {
gridBorder = new GridTitledBorder(pCaption.toString());
} else {
gridBorder = new GridTitledBorder("");
}
if (this.captionFont != null) {
gridBorder.setTitleFont(this.captionFont);
}
setBorder(gridBorder);
}
}