Absolute positioning (without layout manager) compared to absolute positioning in MiGlayout

Will the result of the final application be identical for different platforms and permissions, etc. when using absolute positioning in MiGlayout as a layout manager compared to using the layout manager (setting the layout manager to zero)?

Is there a difference between absolute positioning in the MiGlayout solution and the layout manager solution no?

+2
source share
2 answers

Think about it. Even if you provide one font for your application, it will be displayed differently on different OSs, it can even be displayed differently on the same OS under another DPI.

Layout managers are your protection against these problems, of course, when you start using them, they seem to interfere, but as soon as you use them you will never want to get around (try coding in VB and tell me otherwise)

Layout managers let you focus on the complexity of flow control and usability, without worrying about how it might look like a 2pts font is larger than you plan, or at higher / lower screen resolutions.

I spent 2 years canceling the work of previous developers who insisted on using the Arial font and manually adjusting the size of the components, because he believed that he could not properly configure his forms. The feedback received from users about the changes was positive, and now we are striving to introduce dynamic font resizing in the application. I would not try this without layout managers.

I would say that you have more chances with MigLayout, then you without it -IMHO

+5
source

Is there a difference between absolute positioning in the MiGlayout solution and the layout manager solution no?

and most importantly, the JComponents created by AbsoluteLayout are not modified using the Container, must add a ComponentListener and create a bunch of code for continuous resizing, this is more difficult work, as learning how MigLayout works

+4
source

Source: https://habr.com/ru/post/912411/


All Articles