I have JPanelA with a header border inside JPanelB a JTabbedPanelC. I have a method that updates the contents of A and B, which is called from time to time.
Unfortunately, all elements A and B are updated in time, but not the heading A. I obviously have to switch to another tabbed panel and return to the heading C for the heading that will display correctly. Why?
The code I use is as follows:
TitledBorder tmp
= (TitledBorder) this.GroupingProfilePanel.getBorder();
if ( this.c != null ) {
tmp.setTitle("Set - " + this.c.getName());
} else {
tmp.setTitle("Set");
}
source
share