Questions tagged [flowlayout]

Flow layout places components left to right and then top to bottom, allocating just enough place for each component.

Flow layout is similar to table layout but it allocates just enough width for each component. It has no "columns" because the width of the cells is most often different for every row. The difference between flow and table layout is less obvious when flow layout only has a single row (a quite common case in GUI).

345 questions
5
votes
1 answer

What exactly does an EmptyBorder do?

I'm trying to understand java swing code. I see a piece of code using EmptyBorder in it, but I do not understand what it is doing. I tried to comment that part and run without emptyborder applied, but it doesn't really show any difference to me. Or…
developer3
  • 75
  • 2
  • 9
5
votes
1 answer

Xcode 7 crashes every time when it’s opening

After updating Xcode 7.0.1, I’m not able to open my workspace, every time it’s crashes. After reading all this text I understand it’s about flow layout of collection view, and some negative value. Let's say I don’t have chance to go back to Xcode 6.…
MGY
  • 7,245
  • 5
  • 41
  • 74
5
votes
1 answer

Create a QDockWidget that resizes to it's contents

I have an application where fixed-size child widgets need to be added programatically to a dock widget at run time based on user input. I want to add these widgets to a dock on the Qt::RightDockArea, from top to bottom until it runs out of space,…
Nicolas Holthaus
  • 7,763
  • 4
  • 42
  • 97
5
votes
2 answers

swing flowlayout preferredSize does not change automatically

I want to have a FlowLayout for MyPanel to add some arbitrary buttons. I added MyPanel into JFrame north ( JFrame has a BorderLayout). My problem is: When the buttons inside MyPanel occupy more than one row, they are not displayed. In other…
Dariush Jafari
  • 5,223
  • 7
  • 42
  • 71
5
votes
3 answers

c# flow layout labels got stuck

I have a form with two custom panels and I'm adding some labels to them and in the end i want they to scroll from the right to the left but they are just stucking in the same position. There is a screenshot of what i have There are two panels and…
João Silva
  • 531
  • 4
  • 21
  • 40
5
votes
1 answer

Set size of JLabel in FlowLayout

I have a JPanel that uses FlowLayout. I add a number of JLabels to the JPanel, use setPreferedSize() to adjust their size and save them in a list, label_list. Everything works fine. Then I want to change their size: for(JLabel…
user1506145
  • 5,176
  • 11
  • 46
  • 75
5
votes
4 answers

JTextField displayed as slit when using FlowLayout...please explain

Can someone please explain to me, why every time I use the FlowLayout Layout manager my textfields are displayed as slits. I have bumped my head against this problem for some time now, and I can't seem to figure out why it goes wrong. I get a…
TrashCan
  • 817
  • 4
  • 13
  • 20
4
votes
3 answers

Fill up the empty space of a FlowLayout

I have a flowlayout panel which has a textfield inside. Although the textfield is not that wide but I want to place components on the next line. How do I fill the remaining space with an empty box?
Soler Mani
  • 301
  • 3
  • 5
  • 15
4
votes
1 answer

Is it possible to align components horizontally when using WrapLayout/FlowLayout?

I use WrapLayout which extends FlowLayout Now, I have this GUI: What I want is this: I tried some things like: label.setVerticalAlignment(JLabel.TOP); but the layout does not seem to respect it. I guess this behavior is inherited from…
George Z.
  • 6,643
  • 4
  • 27
  • 47
4
votes
0 answers

Constraint Flow layout rows are getting overlapped

ConstraintLayout version: 2.0.0-beta3 In Constraint flow Layout added views.Placed Views with match constraint, if the view height is wrap content and content height increases rows are overlapping. Here I added my code snippet Steps: 1.Created Flow…
4
votes
3 answers

Layout with auto-wrap within JScrollBar

I'm trying to build a panel with components laid out horizontally, with auto-wrap if not enough place and a vertical scrollbar. Something like this: +-----------------+ |[1][2][3][4][5] | | | +-----------------+ reducing the…
lvr123
  • 524
  • 6
  • 24
4
votes
1 answer

How to make FlowLayout add components to the top of a frame instead of the center?

I am using FlowLayout and I want my components to be "flow" from the top left of my frame to the bottom right instead of starting in the center of the screen. GridLayout does this fine, but it re-adjusts the size of my components and I don't like…
ubiquibacon
  • 10,451
  • 28
  • 109
  • 179
4
votes
1 answer

FlowLayout not flowing with JScrollPane around it

I have a bunch of buttons on a JPanel using a FlowLayout. It looks really nice. When the buttons reach the right side of the panel they start out on a new row creating a nice 2-dimensional grid. Here is the code: Container cp =…
Paul Reiners
  • 8,576
  • 33
  • 117
  • 202
4
votes
0 answers

Why is the flow layout's section inset not respected when dynamic cell sizing is enabled in a UICollectionView?

According to many tutorials and posts like this one on Stackoverflow a UICollectionView's flow layout becomes dynamic once you set its estimatedItemSize property to a non-zero value. If this is the case the flow layout obtains each item size…
Mischa
  • 15,816
  • 8
  • 59
  • 117
4
votes
2 answers

Not able to refresh a layout after adding a view(Only Occurs in CustomAdapter)

Note: this shouldn't have anything to do with libraries, I just include them for details Problem: There is a layout called FlingContainer from this library https://github.com/Diolor/Swipecards. It takes another layout as a parameter(the card to be…
Tintinabulator Zea
  • 2,617
  • 5
  • 18
  • 32
1 2
3
22 23