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
3
votes
1 answer

Resizing panel with flow layout does not invoke the scroll bars

I have a containing panel JPanel with a Flow Layout, the containing panel is in a JScrollPane, the containing panel holds a bunch of other JPanels, inner panels, in it. All the inner panels have the same dimensions. If there are more panels then the…
TacB0sS
  • 10,106
  • 12
  • 75
  • 118
3
votes
1 answer

Auto Layout still required after executing -layoutSubviews. UICollectionView's implementation of -layoutSubviews needs to call super

I use UICollectionView with default UICollectionViewFlowLayout. It works on iOS 8, but on iOS 7.1 I get Terminating app due to uncaught exception 'NSInternalInconsistencyException', reason: 'Auto Layout still required after executing…
onmyway133
  • 45,645
  • 31
  • 257
  • 263
3
votes
1 answer

Swing GUI and translator issues

So I have a class project where I have to create a translator where a user can enter in text, in English, hit a button, and get the Pig Latin translation.I have to use Swing GUI, FlowLayout, and JTextArea, with a separate JTextArea for the…
Alicia
  • 53
  • 5
3
votes
3 answers

SVG in Java not displaying correctly

Ok, I have a Java program, that displays some tiles that are SVGs in a FlowLayout. It does this by being a class ScrabbleRack, and extending JPanel, then adding JSVGCanvas tiles to this panel. Afterwards I created a frame and added the panel, this.…
user323186
  • 95
  • 1
  • 3
  • 9
3
votes
2 answers

FlowLayout with adapter in android

I am looking for any library that help me to make a FlowLayout with adapter, like GridView, but i want to arrange elements in flow! What do you think, what is the best way to do that (FreeFlow)? I have created a StickyListHeadersListView with…
rMozes
  • 201
  • 3
  • 9
3
votes
1 answer

FlowLayout wrapping is not working in nested JPanel

I am trying to organise a frame according to the following pattern: _______________________ | ___________________ | | | + + + + + | | | | + + | | | |___________________| | | ___________ | | | + + + | …
R2B2
  • 1,541
  • 1
  • 12
  • 19
3
votes
1 answer

How to 'fit' the cells of UICollectionView FlowLayout?

My aim is to create an UICollectionView with different cell sizes and all cells "fit in". There should be no empty place around the cells. Here is an image of my Demo Application: The sizes of t he Cells are quarter, quaver and semiquaver (1/4, 1/8…
brush51
  • 5,691
  • 6
  • 39
  • 73
3
votes
1 answer

How can I use Swing FlowLayout with fixed width?

I'm doing a prototype for showing some basic functions of a painting program. Now, here is how the window looks like: The window is compound of a panel with a vertical BoxLayout, inside it, there are a custom image control and another panel with a…
Alex Text
  • 269
  • 1
  • 4
  • 11
3
votes
1 answer

add a search bar to header in collection view with custom flow layout

I am trying to add a search bar as the header to a custom flow layout class. I know how to add it in storyboard if the flow layout is not custom by simply checking the section header box, but as soon as i use a custom class, that option is no…
fragle
  • 51
  • 6
3
votes
3 answers

Using BoxLayout as vertical FlowLayout to hold JPanel

I want to have a vertical FlowLayout to host my JPanels. A lot of ppl suggest using BoxLayout. However, I realize its behavior is not exactly same as FlowLayout FlowLayout BoxLayout with Y axis As you can see, in FlowLayout, when I stretch…
Cheok Yan Cheng
  • 47,586
  • 132
  • 466
  • 875
3
votes
1 answer

How can I add a title/label supplementary view for each cell in a UICollectionViewFlowLayout?

All examples I've seen use the supplementary view as headers or footers. I need to add a label above and/or below each cell in my flow layout. At first I thought all I had to do was register a class for a supplementary view of kind and then…
3
votes
1 answer

GUI programming, FlowLayout blocking other things on JFrame(?)

The idea of the program is that I have some buttons and an icon SOMEWHERE on the frame. I want the buttons to change the color. I'm only worried about making all the elements show up right now. If I comment out lines 11-13, I see "hello," printed…
GrinReaper
  • 93
  • 2
  • 9
3
votes
1 answer

how to minimize a panel inside a container

I have three buttons close,min and max. When i want to max it then it will take the shape of the main container and overlaps all the panel and when i close it then only that panel gets affected. But when i hit the min button it gets minimized to…
user2045376
3
votes
2 answers

Java Swing - JTable not showing

I'm having some troubles with Java Swing. I'm trying to make a frame with a control panel at the top with some buttons in it. and below that i want a JTable to show I've been trying but the table is not showing. If I remove the controlPanel at the…
dumazy
  • 13,857
  • 12
  • 66
  • 113
3
votes
1 answer

How to make BoxLayout behave as vertical FlowLayout?

FlowLayout performs "pressure" from the right, so as all components are trying to take their minimal widths. Contrary, BoxLayout tries to spread all components to fill entire height of the space. Can I add some filler as last component or something…
Suzan Cioc
  • 29,281
  • 63
  • 213
  • 385