@@ -59,6 +59,7 @@ public class TabDataRenderer implements TableCellRenderer {
5959 private static final Color inactiveUnderlineColor = UIManager .getColor ("nb.multitabs.inactiveUnderlineColor" ); // NOI18N
6060 private static final Color activeBackground = UIManager .getColor ("nb.multitabs.activeBackground" ); // NOI18N
6161 private static final Color hoverBackground = UIManager .getColor ("nb.multitabs.hoverBackground" ); // NOI18N
62+ private static final boolean underlineAtTop = UIManager .getBoolean ("EditorTab.underlineAtTop" );
6263
6364 private final RendererPanel renderer = new RendererPanel ();
6465 private final List <TabDecorator > decorators = getDecorators ();
@@ -238,10 +239,18 @@ public void paint( Graphics g ) {
238239 switch (tabsLocation ) {
239240 default :
240241 case JTabbedPane .TOP :
241- g .fillRect (0 , rect .height - underlineHeight , rect .width , underlineHeight );
242+ if (underlineAtTop ) {
243+ g .fillRect (0 , 0 , rect .width , underlineHeight );
244+ } else {
245+ g .fillRect (0 , rect .height - underlineHeight , rect .width , underlineHeight );
246+ }
242247 break ;
243248 case JTabbedPane .BOTTOM :
244- g .fillRect (0 , 0 , rect .width , underlineHeight );
249+ if (underlineAtTop ) {
250+ g .fillRect (0 , rect .height - underlineHeight , rect .width , underlineHeight );
251+ } else {
252+ g .fillRect (0 , 0 , rect .width , underlineHeight );
253+ }
245254 break ;
246255 case JTabbedPane .LEFT :
247256 g .fillRect (rect .width - underlineHeight , 0 , underlineHeight , rect .height );
0 commit comments