Skip to content

Commit 3ab009d

Browse files
committed
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.
1 parent 53750cf commit 3ab009d

1 file changed

Lines changed: 12 additions & 1 deletion

File tree

src/main/java/the/bytecode/club/bytecodeviewer/gui/components/VisibleComponent.java

Lines changed: 12 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,8 +3,10 @@
33
import com.github.weisj.darklaf.icons.ThemedSVGIcon;
44
import the.bytecode.club.bytecodeviewer.Configuration;
55
import the.bytecode.club.bytecodeviewer.gui.resourceviewer.Workspace;
6+
import the.bytecode.club.bytecodeviewer.gui.theme.LAFTheme;
67
import the.bytecode.club.bytecodeviewer.resources.IconResources;
78

9+
import javax.swing.BorderFactory;
810
import javax.swing.JInternalFrame;
911

1012
/***************************************************************************
@@ -40,7 +42,16 @@ public VisibleComponent(final String title)
4042
super(title, false, false, false, false);
4143
this.setDefaultIcon();
4244
}
43-
45+
46+
@Override
47+
public void updateUI() {
48+
if (Configuration.lafTheme != LAFTheme.SYSTEM)
49+
setBorder(BorderFactory.createEmptyBorder());
50+
else
51+
setBorder(null);
52+
super.updateUI();
53+
}
54+
4455
public void setDefaultIcon()
4556
{
4657
try {

0 commit comments

Comments
 (0)