I have a JPanel
A with a title border inside a JPanel
B of a JTabbedPanel
C. I have a method refreshing the content of A and B which is called from time-to-time.
Unfortunately, all the items of A and B are refreshed in time, but not the title of A. I explicitely have to switch to another tabbed panel and come back to C for A's title to be displayed properly. Why?
The code I am using is the following:
TitledBorder tmp
= (TitledBorder) this.GroupingProfilePanel.getBorder();
// Resetting header
if ( this.c != null ) {
tmp.setTitle("Set - " + this.c.getName());
} else {
tmp.setTitle("Set");
}