miglayout

Which layout can do this?

99封情书 提交于 2019-11-29 02:37:44
问题 I'm trying to layout some JLabels in my application as shown in this example: I always have this JLabel at the middle and the number of the others JLabels is variable it can go from 1 to 30. I have tried Grid layout by choosing a good number of columns/rows and setting some empty JLabels in the white space but i can't get a good result, and can't find how to do it with MigLayout, did any one have a good layouting soulution or any other solution. PS : I don't want to show the circle it's just

JScrollpane needs to shrink its width

◇◆丶佛笑我妖孽 提交于 2019-11-28 01:03:36
I have a JScrollpane that has a JPanel on the inside (and the panel contains some JLabel s). I want resizing the scroll pane to actually change its size (possibly below the preferred size of the inner components), not just the size of the viewport. The goal is for the inner panel to gracefully disappear (using specific shrink priorities and the like in my miglayout) when the user shrinks the scrollpane too small. Probably the best method is to have the contained component always be the same width as the viewport. To do this the first contained component (the one that is the child to JViewPort

JScrollpane needs to shrink its width

安稳与你 提交于 2019-11-27 19:12:11
问题 I have a JScrollpane that has a JPanel on the inside (and the panel contains some JLabel s). I want resizing the scroll pane to actually change its size (possibly below the preferred size of the inner components), not just the size of the viewport. The goal is for the inner panel to gracefully disappear (using specific shrink priorities and the like in my miglayout) when the user shrinks the scrollpane too small. 回答1: Probably the best method is to have the contained component always be the