2

I would like to remove the lines drawn around just the "tab" at the top. So I am on left with the label text.

How can I do this? I HAVE SEARCHED extensively but nothing works for me.

enter image description here

mKorbel
  • 109,525
  • 20
  • 134
  • 319
ManInMoon
  • 6,795
  • 15
  • 70
  • 133

2 Answers2

0

Below are all the UIManager values that seem to affect the area you are targeting. As my previous answer didn't work for you I have listed all the ones I believe are relevant, I would suggest copying the below list and then commenting various ones out to monitoring the effects and see if one, or a combination will prove successful for you. I recommend putting them in before calling the tabbedpane constructor.

    UIManager.put("TabbedPane.borderHightlightColor", java.awt.Color.CYAN); 
    UIManager.put("TabbedPane.darkShadow", java.awt.Color.CYAN); 
    UIManager.put("TabbedPane.light", java.awt.Color.CYAN);
    UIManager.put("TabbedPane.selectHighlight", java.awt.Color.CYAN);
    UIManager.put("TabbedPane.darkShadow", java.awt.Color.CYAN);
    UIManager.put("TabbedPane.focus", java.awt.Color.CYAN);

I have put the color CYAN because it is very bright, and so very clear what has changed with each one.

Good luck!

Levenal
  • 3,796
  • 3
  • 24
  • 29
  • I tried all these colours: java.awt.Color.BLACK, Color.GREEN, new Color(0, 0, 0,0) & null. But all leave a thin white border. The Color.GREEN actually puts a thin green border inside. So it almost is as if there are 2 borders... None of them remove it though. – ManInMoon Nov 20 '13 at 12:39
  • @ManInMoon I have re-jigged my answer with some more values, please try testing them on your application and see if you can get a correct combo. – Levenal Nov 20 '13 at 13:13
0

You're searching for:

UIManager.getDefaults().put("TabbedPane.lightHighlight", Color.BLACK);
UIManager.getDefaults().put("TabbedPane.selectHighlight", Color.BLACK);

You might find something better in this list: http://www.rgagnon.com/javadetails/JavaUIDefaults.txt

Leo Pflug
  • 544
  • 3
  • 15