Hi all! There is a border on SwingPanel when runni...
# compose-desktop
t
Hi all! There is a border on SwingPanel when running on Windows. How can I remove it?
k
Screenshot? Code snippet? Something?
t
@Kirill Grouchnikov As you can see on the right area, there is a tiny gray border
k
It can be a bunch of things. Maybe there’s a border on one of the swing components set by either the component or the look-and-feel you’re using. Maybe there’s an off-by-one mismatch in the layout, and that calendar widget doesn’t fully fill its parent area. Maybe you have a container whose fill color is lighter gray compared to the darker gray of its content.
t
@Kirill Grouchnikov even when I use a empty JPanel there is a border
Calendar is written by myself, there is no any third party widget.
This only happened on Windows, macOS is ok.
@Kirill Grouchnikov here is pure compose content on the right. No border at all.
I can access JPanel(parent of factory()) created by SwingPanel on update callback. But the JPanel parent is null, I can’t get any information of its parent.
k
Make as simple of a reproducer as you can, removing everything but the bare minimum needed to reproduce this, and then post the full code of it. Without seeing the code it’s impossible to tell.
t
https://github.com/ionull/SwingPanelBorderBug @Kirill Grouchnikov here is the min example
Screenshot 2023-10-16 at 22.15.46.png
Image from iOS.jpg
mac and win screenshot
Windows 10 macOS Sonoma
This problem does not exist on Linux as well (Ubuntu 22.04)
k
Is it the same display with the same density?
t
@Kirill Grouchnikov I will run it with same display if needed, have both systems installed
The Linux is same display with Windows
@Kirill Grouchnikov here is Linux Screenshot with same display as Windows
@Kirill Grouchnikov can you reproduce it on Windows?
@Kirill Grouchnikov I just asked my friend to test it. There is no problem on his Windows 11. It could be a problem that only exists on BootCamp Windows.