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

FlowLayout / GridLayout combining?

Alright I am trying to create a program that takes System.in from a scanner, places the input in a string, then creates a button layout based on the input. I am pretty new with Java and somewhat self taught so if this looks funky it is because I am…
-1
votes
1 answer

how to add new line in java

How do you add a new line in java. I can change the width of the frame but if the user manually expands it, all the controls display on the same line. import java.awt.*; import javax.swing.*; import javax.swing.JFrame; import…
-1
votes
1 answer

JScrollPane not working correctly when adding JPanel (with FlowLayout) into JScrollPane

I tried to add a JPanel (with FlowLayout) to a JScrollPane but the ScrollBar is not working. I want to place buttons as grid but it places horizontally. import javax.swing.*; import java.awt.*; public class Test { public static void…
-1
votes
1 answer

How do i disable autoresizingmask constraints in collection view cell?

I am using collection view with flow layout. But it doesn't work the way i want. UICollectionViewDelegateFlowLayout methods are calling, but sizes for cells are different at run time. In debug view hierarchy i noticed some strange constraints,…
Egor Kolyshkin
  • 117
  • 1
  • 10
-1
votes
3 answers

Swing: multiline toolbar or using Flowlayout as toolbar

I have toolbar with random number of buttons from two up to twenty. Width of each button can vary. I have to put them all at top area and use JToolBar. On a small screen resolutions (e.g. 800x600) some buttons could be out of screen (AFAIK JToolbar…
FoxyBOA
  • 5,788
  • 8
  • 48
  • 82
-1
votes
2 answers

java swing calculator layouts

I need to do an assignment and create a calculator. It's a beginner Java course, so keep in mind that I'm no expert. It shouldn't look spectacular, so the easiest way to achieve the below would be great. The inner workings of it is fine, but…
alwynmalan
  • 149
  • 1
  • 1
  • 12
-1
votes
1 answer

Moving between JButtons using keyboard

I want to add JButtons in JPanel using FlowLayout or any other layout and moving between the JButtons using Up and Down key..Having problem in moving up and down because i dont know the rows and columns of JButton. public class…
Nainisha
  • 1
  • 4
-2
votes
1 answer

UICollectionView Custom layout header with section headers

I have been googling and struggling with this for a while. what I need is basically to create UICollectionViewFlowLayout which supports both - The main collectionView header (as for instance you can create simply in UITableView by dragging view into…
Dominik Bucher
  • 2,120
  • 2
  • 16
  • 25
-2
votes
1 answer

Dragdrop usercontrol to flowlayoutpanel in winforms

I'm building a drag/drop application in winforms c#, i need to drag a usercontrol and drop it to a flowlayoutpanle. everything works fine, except the drop location, the flowpanel sets the droped items side by side. how can I set the droped item to…
Arh Hokagi
  • 170
  • 5
  • 21
-2
votes
1 answer

How to force overlap of JLabels

I know I still need to convert string to int and to double for providerID and providerPrice so I can set them and then store them later; I expect I can figure that out just fine. What I can't seem to find is how to make the JLabels align properly. …
-2
votes
1 answer

Change overlapping of JButtons in flowlayout

How do I repaint the farthest right card last and the left most first so the overlapping will reverse? So I have a JPanel in flowlayout which contains JButtons. I want to emulate the feel of holding cards in hand, so I overlapped the JButtons. The…
halfway258
  • 115
  • 13
-2
votes
1 answer

What should I use when trying to create a place to enter text when using FlowLayout?

I have a school project which requires creating a GUI. I am using flow-layout for the first time, and cannot figure out what I should use to create an area where I can enter text. None of the classes I used before work with flow-Layout. It needs…
-2
votes
2 answers

Gridlayout and Flowlayout. what are these?

i would ask a question. WHAT and WHAT are the DIFFERENCE of FLOWLAYOUT and GRIDLAOUT in java. advantages and disadvantages (if theres). because my prof says about these terms to build a GUI in java. and all i know is the JOption. so what are…
jarnthrax
  • 146
  • 3
  • 4
  • 11
-3
votes
1 answer

C# I don't understand why this button won't delete

basically... When the user accepts or rejects a friend request it is supposed to remove the user's name, accept and reject button but it only removes the user's name and reject button. I don't understand. Code: private void…
richardj97
  • 79
  • 1
  • 10
-7
votes
1 answer

How to use this design in my app?

How to implement the design given in the link below. I've tried different flow layout libraries but they lack customization.Thanks in advance
user8028489
  • 1
  • 1
  • 2
1 2 3
22
23