@@ -34,13 +34,19 @@ public class ContributedLibraryTableCellJPanel extends JPanel {
34
34
final JPanel inactiveButtonsPanel ;
35
35
final JLabel statusLabel ;
36
36
final JTextPane description ;
37
+ final TitledBorder titledBorder ;
37
38
private final String moreInfoLbl = tr ("More info" );
38
39
39
40
public ContributedLibraryTableCellJPanel (JTable parentTable , Object value ,
40
41
boolean isSelected ) {
41
42
super ();
42
43
setLayout (new BoxLayout (this , BoxLayout .Y_AXIS ));
43
44
45
+ // Actual title set below
46
+ titledBorder = BorderFactory .createTitledBorder ("" );
47
+ titledBorder .setTitleFont (getFont ().deriveFont (Font .BOLD ));
48
+ setBorder (titledBorder );
49
+
44
50
moreInfoButton = new JButton (moreInfoLbl );
45
51
moreInfoButton .setVisible (false );
46
52
installButton = new JButton (tr ("Install" ));
@@ -120,9 +126,7 @@ public ContributedLibraryTableCellJPanel(JTable parentTable, Object value,
120
126
return ;
121
127
122
128
ContributedLibrary selected = releases .getSelected ();
123
- TitledBorder titledBorder = BorderFactory .createTitledBorder (selected .getName ());
124
- titledBorder .setTitleFont (getFont ().deriveFont (Font .BOLD ));
125
- setBorder (titledBorder );
129
+ titledBorder .setTitle (selected .getName ());
126
130
Optional <ContributedLibrary > mayInstalled = releases .getInstalled ();
127
131
128
132
boolean installable , upgradable ;
@@ -271,5 +275,7 @@ public void setForeground(Color c) {
271
275
// The description is not opaque, so copy our foreground color to it.
272
276
if (description != null )
273
277
description .setForeground (c );
278
+ if (titledBorder != null )
279
+ titledBorder .setTitleColor (c );
274
280
}
275
281
}
0 commit comments