I am trying to change the shape of the tabs in a JTabbedPane
. Using setTabComponentAt(0, someComponent);
doesn't change the exterior of the tab, which is a rectangle with a diagonal top-left corner. What may be done to change the shape?
相关问题
- Delete Messages from a Topic in Apache Kafka
- Jackson Deserialization not calling deserialize on
- How to maintain order of key-value in DataFrame sa
- StackExchange API - Deserialize Date in JSON Respo
- Difference between Types.INTEGER and Types.NULL in
The shape is under the aegis of the tabbed pane's UI delegate, which descends from
TabbedPaneUI
. TheMetalTabbedPaneUI
subclass is an example that may help you decide how badly you want to replace the delegate.You can put html tags into the first parameter of addTab method as following :
MyJTabbedPane.addTab("<html><h1 style='padding:20px;'>TEST</h1></html>", new JPanel());
correct way is only to change Look and Feel, nice example from
Old.Java.Forums.Sun
and