layout-manager
How can I make JFrame resize automatically to display all buttons
I have a simple swing application which consists of a JLabel and three buttons. The three buttons are in their own JPanel which is in a JFrame along with the JLabel. The JPanel uses flowlayout manager[详细]
2023-01-26 14:36 分类:问答Java Layout Managers
What are the benefits of using an existing layout manager as opposed writing a listener that handles resizing functions? For instance, I needed to arrange buttons in a grid and center the grid:[详细]
2023-01-25 00:58 分类:问答Java BorderLayout Equal Size/Alignment
Using BorderLayout, how would I add two components that are equal in size and alignment and will resize as such.[详细]
2023-01-24 20:47 分类:问答how to write a layout manager?
I\'d like write a layout manager for j2me. I already have widgets and panels (panel is a set of widgets in this context). Now I\'d like to add dynimc layout management so when i call doLayout on the o[详细]
2023-01-22 12:26 分类:问答Java Swing: How do I define one minimal dimension (of the two) for components?
To define minimal size successfully, I have to do the following: // setting minimal width AND height Dimension min = new Dimension(100, 100);[详细]
2023-01-19 07:05 分类:问答GridBagLayout goes crazy
I have a GridBagLayout, but one label (maxSizeLbl) goes crazy and an other one (maxDateLbl) isnt visible, anyone knows what I\'ve done wrong?[详细]
2023-01-18 17:18 分类:问答Why the layout managers in QT doesn't work?
this->setWindowTitle(tr(\"数据转移程序\")); edt_ftp_server = new QLineEdit; edt_ftp_port = new QLineEdit;[详细]
2023-01-17 11:16 分类:问答Why doesn't setLocation() move my label?
I have the following code where I try to place a JLabel in a custom location on a JFrame. public class GUI extends JFrame[详细]
2023-01-16 07:57 分类:问答GridBagLayout: equally distributed cells
Is it possible to completely emulate the behavior of a GridLayout with the GridBagLayout manager? Basically, I have a 8x8 grid in which each cell should have the same width and height. The GridLayout[详细]
2023-01-15 15:46 分类:问答Fixed width, variable height in JPanel with flow
I have an annoying problem with Java’s layout managers. I have the following situation: In a panel A are two other panels B with an absolute layout and C with a FlowLayout. B is highly customized and[详细]
2023-01-14 19:39 分类:问答