JFormDesigner / FlatLaf

FlatLaf - Swing Look and Feel (with Darcula/IntelliJ themes support)
https://www.formdev.com/flatlaf/
Apache License 2.0
3.42k stars 272 forks source link

mis-allignment of jtable and jtextfield #872

Closed Hellf0rg0d closed 3 months ago

Hellf0rg0d commented 3 months ago

I was working on an application and found that the allignment of jtable and jtextfield is incorrect but when i build it without using flatlaf it gets aligned correctly see the screenshots below. without flatlaf : image

with flatlaf MacDarkLaf : image

poce1don commented 3 months ago

This is not a problem with the FlatLaf library. Positioning components "freely" is not the best way to build your graphical interface 👎 . Make use of layout managers, such as MigLayout (this is the best) 👏 or GridLayoutManager (IntelliJ) 👍 and you won't have this type of problem with alignments ✌️ .

Hellf0rg0d commented 3 months ago

i am using group layout...

DevCharly commented 3 months ago

This is not a FlatLaf bug.

Different L&Fs use different fonts which results in different component sizes.

i am using group layout...

Then tell group layout that the two components should have same width.