Set empty border on VisibleComponent

VisibleComponent is a JInternalFrame but never used in a JDesktopPane. Darklaf adds a shadow border around the frame which looks odd in this case. Explicitly setting an empty border solves this issue.
This commit is contained in:
weisj 2021-08-05 12:35:23 +02:00
parent 53750cffa2
commit 3ab009dc5b
No known key found for this signature in database
GPG Key ID: 31124CB75461DA2A
1 changed files with 12 additions and 1 deletions

View File

@ -3,8 +3,10 @@ package the.bytecode.club.bytecodeviewer.gui.components;
import com.github.weisj.darklaf.icons.ThemedSVGIcon;
import the.bytecode.club.bytecodeviewer.Configuration;
import the.bytecode.club.bytecodeviewer.gui.resourceviewer.Workspace;
import the.bytecode.club.bytecodeviewer.gui.theme.LAFTheme;
import the.bytecode.club.bytecodeviewer.resources.IconResources;
import javax.swing.BorderFactory;
import javax.swing.JInternalFrame;
/***************************************************************************
@ -40,7 +42,16 @@ public abstract class VisibleComponent extends JInternalFrame
super(title, false, false, false, false);
this.setDefaultIcon();
}
@Override
public void updateUI() {
if (Configuration.lafTheme != LAFTheme.SYSTEM)
setBorder(BorderFactory.createEmptyBorder());
else
setBorder(null);
super.updateUI();
}
public void setDefaultIcon()
{
try {