简体   繁体   English

如何在IntelliJ IDEA GUI设计器上为Java自由拖放元素?

[英]How to freely drag and drop elements on IntelliJ IDEA GUI designer for Java?

Whenever I create a new GUI Form, all the base layout manager types I select have some sort of grid or alignment. 每当我创建一个新的GUI表单时,我选择的所有基本布局管理器类型都有某种网格或对齐方式。 How can I make it so that I can drag the buttons, textboxes, etc freely without grids? 如何制作它以便我可以在没有网格的情况下自由拖动按钮,文本框等?

I'm no way knowledged in Java and am just poking around to see if I can get along with it as an additional language. 我不会用Java知道,我只是在四处寻找,看看我是否可以将它作为一种额外的语言。

I Think this still applies IntelliJ: How to use No Layout or Absolute Layout like Eclipse? 我认为这仍然适用于IntelliJ:如何使用像Eclipse这样的无布局或绝对布局?

Layout managers in swing has some sort of boundaries that they work with. 摆动式布局管理器具有某种与之相关的边界。 As far as i have read in the docs the GUI-builder aims to mimic their behaviours (haven't used it myself). 至于我在文档中读到的GUI构建器旨在模仿他们的行为(我自己没有使用它)。 It's better to learn how they work instead to position your components properly. 最好是了解它们的工作方式,以便正确定位组件。

Read up on the managers and their behaviour here: http://docs.oracle.com/javase/tutorial/uiswing/layout/layoutlist.html 阅读管理人员及其行为: http//docs.oracle.com/javase/tutorial/uiswing/layout/layoutlist.html

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM