TabbedPane: fixed content separator in scroll tab policy

This commit is contained in:
Karl Tauber
2019-08-28 18:57:57 +02:00
parent 7a6dd4d9c0
commit c7b0985793
2 changed files with 75 additions and 11 deletions

View File

@@ -181,12 +181,15 @@ public class FlatTestFrame
private void explicitColors( Container container, boolean explicit, ColorUIResource restoreColor ) {
for( Component c : container.getComponents() ) {
if( c instanceof JPanel ) {
explicitColors( (JPanel) c, explicit, restoreColor );
continue;
}
c.setForeground( explicit ? Color.blue : restoreColor );
c.setBackground( explicit ? Color.red : restoreColor );
if( c instanceof JPanel )
explicitColors( (JPanel) c, explicit, restoreColor );
else if( c instanceof JScrollPane ) {
if( c instanceof JScrollPane ) {
Component view = ((JScrollPane)c).getViewport().getView();
if( view != null ) {
view.setForeground( explicit ? Color.magenta : restoreColor );