Pregunta

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

¿Fue útil?

Solución

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!

Otros consejos

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

Licenciado bajo: CC-BY-SA con atribución
No afiliado a StackOverflow
scroll top