diff --git a/src/main/kotlin/app/termora/sftp/SFTPTabbed.kt b/src/main/kotlin/app/termora/sftp/SFTPTabbed.kt index e1b4797..5f9aca8 100644 --- a/src/main/kotlin/app/termora/sftp/SFTPTabbed.kt +++ b/src/main/kotlin/app/termora/sftp/SFTPTabbed.kt @@ -34,14 +34,6 @@ class SFTPTabbed(private val transportManager: TransportManager) : FlatTabbedPan super.setTabLayoutPolicy(SCROLL_TAB_LAYOUT) super.setTabsClosable(true) super.setTabType(TabType.underlined) - super.setStyleMap( - mapOf( - "focusColor" to UIManager.getColor("TabbedPane.selectedBackground"), - "hoverColor" to UIManager.getColor("TabbedPane.background"), - "tabHeight" to 30 - ) - ) - val toolbar = JToolBar() toolbar.add(addBtn) @@ -157,6 +149,14 @@ class SFTPTabbed(private val transportManager: TransportManager) : FlatTabbedPan return null } + override fun updateUI() { + styleMap = mapOf( + "focusColor" to UIManager.getColor("TabbedPane.selectedBackground"), + "hoverColor" to UIManager.getColor("TabbedPane.background"), + "tabHeight" to 30 + ) + super.updateUI() + } override fun removeTabAt(index: Int) { val c = getComponentAt(index)