Note that there are some explanatory texts on larger screens.

plurals
  1. PO
    text
    copied!<p>To whom it may concern:</p> <p>A colleague found the source of the problem. In:</p> <pre><code>package javax.swing.plaf.synth.SynthTabbedPaneUI; </code></pre> <p>it says:</p> <pre><code>protected void paint(SynthContext context, Graphics g) { int selectedIndex = tabPane.getSelectedIndex(); int tabPlacement = tabPane.getTabPlacement(); ensureCurrentLayout(); // Paint tab area // If scrollable tabs are enabled, the tab area will be // painted by the scrollable tab panel instead. // if (!scrollableTabLayoutEnabled()) { // WRAP_TAB_LAYOUT [...] // Here is code calculating the content border [...] } // Paint content border paintContentBorder(tabContentContext, g, tabPlacement, selectedIndex); } </code></pre> <p>As you can see the scrollableTabLayout is excluded from the following code where the size of the divider is calculated. As you follow the brackets you see: it later on is painted nevertheless, but with wrong params. This leads to the behaviour that the divider is omitted if the Tabs are set TOP or LEFT of the content. If set to RIGHT or BOTTOM the divider in fact is displayed, but broken (Border towards content too thick, overall not long enough. </p> <p>It would take quite some efford to override everything from Synth to Nimbus because there are a heck of a lot final and package-protected classes.</p> <p>Therefore you might want to take the easier route:</p> <pre><code>uiDefaults.put("TabbedPane:TabbedPaneTabArea.contentMargins", new InsetsUIResource(3, 10, 0, 10)); </code></pre> <p>This will strip the lower gap to your tabs and you may put a "fake" divider on the topper brink of your content-panel. Thats the way we handle it, though.</p> <p>Hope it helps. Enjoy!</p>
 

Querying!

 
Guidance

SQuiL has stopped working due to an internal error.

If you are curious you may find further information in the browser console, which is accessible through the devtools (F12).

Reload