springlayout

Is SpringLayout a fixed-size layout manager?

冷暖自知 提交于 2020-03-05 00:23:06
问题 I know the following Java Swing layout managers: FlowLayout , BoxLayout , BorderLayout , GridLayout , GroupLayout (which I avoid using), and GridBagLayout . I call GridBagLayout a fixed-size layout manager as it defines rows and columns with fixed size. I would not use it in a responsive application if I want all my panels to be resizable. I would try to combine a few of the other layout managers instead. Out of curiosity I'm considering adopting a new layout manager, SpringLayout , for an

Is SpringLayout a fixed-size layout manager?

99封情书 提交于 2020-03-05 00:22:46
问题 I know the following Java Swing layout managers: FlowLayout , BoxLayout , BorderLayout , GridLayout , GroupLayout (which I avoid using), and GridBagLayout . I call GridBagLayout a fixed-size layout manager as it defines rows and columns with fixed size. I would not use it in a responsive application if I want all my panels to be resizable. I would try to combine a few of the other layout managers instead. Out of curiosity I'm considering adopting a new layout manager, SpringLayout , for an

Adding JPanel to JScrollPane

谁说胖子不能爱 提交于 2019-12-31 04:02:34
问题 I have a gui which has a Panel that contains a sequence of labels and TextFields and uses a spring layout(this is the mainPanel) and another Panel that just contains a button(buttonPanel). I am trying to make my mainPanel to have a vertical scrollbar as well. I would like to implement my GUI such that within the JFrame I have 2 panels. The mainPanel appears on the top of the frame and the buttonPanel appears below the mainPanel. My problem is I am not able to make the Panels appear such that

Adding JPanel to JScrollPane

走远了吗. 提交于 2019-12-02 02:55:35
I have a gui which has a Panel that contains a sequence of labels and TextFields and uses a spring layout(this is the mainPanel) and another Panel that just contains a button(buttonPanel). I am trying to make my mainPanel to have a vertical scrollbar as well. I would like to implement my GUI such that within the JFrame I have 2 panels. The mainPanel appears on the top of the frame and the buttonPanel appears below the mainPanel. My problem is I am not able to make the Panels appear such that the buttonPanel is below the mainPanel and I am also not sure how to add a scrollbar to the mainPanel.