Turn off IntelliJ GUI Builder auto-arrangement?

How can I disable automatic arranging in the GUI builder in IntelliJ? I can only arrange it in specific positions, but can I turn that off, or is there another option? Perhaps a different GUI builder?

1 vote, average: 1.00 out of 1 (1 rating, 1 votes, rated)
You need to be a registered member to rate this.
Loading...
Subscribe
Notify of
3 Answers
Oldest
Newest Most Voted
Inline Feedbacks
View all comments
regex9
5 months ago

For each component you add to your GUI, you can assign your own layout manager (select your component in the Component Tree and then look under its properties). Here you can choose from:

  • BorderLayout (simple division in top/bottom/right/left/center)
  • CardLayout (department in cards/slides, of which only one is visible)
  • FlowLayout (simple horizontal or vertical rowing)
  • FormLayout (a kind of flexible grid)
  • GridBagLayout (a weighted grid)
  • GridLayoutManager (a simple grid; the standard manager set by IntelliJ)

Plan best in advance how to structure your surface and then box layouts by using container components (such as JPanel ) intertwined.

regex9
5 months ago
Reply to  xNoxxi

This is not the concept of swing. The Layout Managers not only provide an orderly distribution of the components but also help with the size calculation for the frame. The aim is to provide user-friendly surfaces which can be used for any user as possible.

If you do not want to deal with Swing, you should actually look for another UI conversion. For example, you could create a web interface (web application / JavaFX + WebView / Swing + JxBrowser). While I would also be discouraged from absolute positions, because if you change the size of the window (which should always be possible!), elements quickly slide together (overlap) and make the application so invaluable.