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

I Need To Know How To Add Space In A FlowLayout

I would like to add some space between the JTextField and the JButtons, i am using a flow layout, and help would be appreciated The text field and the buttons are to close, any input would help, i am a newb I am making a calculator CODE import…
ndfkj asdkfh
  • 316
  • 1
  • 5
  • 15
0
votes
1 answer

JTextField Size Changing When I Change The Font

When I Change The Font Of My JTextField The Actual JTextField Resizes, Any Help? I am working on a calculator and obviously based on how bad the code is you can tell the I am a noob Any Help Would Be Appreciated CODE: import…
ndfkj asdkfh
  • 316
  • 1
  • 5
  • 15
0
votes
1 answer

final JPanel with added labels (java)

Iam trying to position my jlabel in a jpanel what is made final because of an actionlistener. final JPanel panelPayDetails = new JPanel(); panelPayDetails.setBounds(250, 25, 350, 250); JLabel lblnumber = new JLabel("Insert Number:"); …
user2445977
  • 1
  • 1
  • 2
  • 6
0
votes
1 answer

Adding panel to BorderLayout region, elements not wrapping as they should

So I have some code like this inside init() for an applet: layout = new BorderLayout(); setLayout(layout); northPanel = new JPanel(new…
Watabou
  • 51
  • 1
  • 3
  • 9
0
votes
1 answer

How to constrain uicollectionviewflowlayout to a specified frame

I'm fairly new to UICollectionView. Though I've watched the WWDC talks on it I'm still unclear how to achieve my layout. I'm trying to constrain my flow layout to a square bottom aligned to the window's rootviewcontroller (see image). However, when…
Pouria Almassi
  • 1,580
  • 2
  • 17
  • 26
0
votes
2 answers

Adding JPanel to JFrame with FlowLayout

I am trying to display a filled oval on the screen using a subclass of JPanel when I try to add an object of this subclass to a JFrame with FlowLayout the oval is not displayed correctly I don't know what the problem is. Could you help me…
kzidane
  • 753
  • 3
  • 11
  • 29
0
votes
1 answer

Android-Flow Layout in JAVA

I m giving 3 sentences in 3 text views in JAVA file in horizontal orientation but only 2 text view that is only 2 sentences are comin but the third sentence gets disappeared due to the resolution of the mobile. My query is how to get the third text…
user2109950
  • 29
  • 1
  • 7
0
votes
1 answer

Reduce gap between JPanels

I have a simple Class StatPanel that extends JPanel and has a few JTextFields, a JCheckBox, and a couple JLabels. The panel is going to be used as a series of panels used to display information and allow the user to edit the data in some of the…
user1113827
  • 69
  • 1
  • 2
  • 9
0
votes
3 answers

Aligning components on two panels which are using flow layouts

I have two panels which are using flow layouts. These panels have same number of components (labels and text boxes). How do I align them?
vasu1486
  • 127
  • 2
  • 7
0
votes
1 answer

Can I resize only the height of my frame using pack()?

I am writing a program that brings up a JDialog box that lists multiple options from a config file. The number of options can vary each time it is opened, so I need to be able to dynamically adjust the height of the window, but not the width. The…
Ron Butcher
  • 489
  • 7
  • 16
0
votes
1 answer

Fill up the empty space of a FlowLayout on Android

I'm creating an app which has a flow layout. The FlowLayout implementation I found from the web (I don't remember exactly from where). Now, when my layout width greater than sum of the widths of its children, I need to fill the empty space, giving…
Karlen Kishmiryan
  • 7,322
  • 5
  • 35
  • 45
0
votes
1 answer

Swing flow layout properties

I've been playing around with the card layout demo: http://docs.oracle.com/javase/tutorial/displayCode.html?code=http://docs.oracle.com/javase/tutorial/uiswing/examples/layout/CardLayoutDemoProject/src/layout/CardLayoutDemo.java I want to build a…
mao
  • 1,059
  • 2
  • 23
  • 43
0
votes
1 answer

cant add second JLabel to second JPanel in single JWindow

I'm trying to add 2 seperate JLabels to 2 seperate JPanels, all within one JWindow! The first label displays fine in the first JPanel. However the second JLabel doesnt show, although the second JPanel does! So I just need to know basically how to…
aubreybourke
  • 439
  • 1
  • 5
  • 17
0
votes
1 answer

Working with Java layout managers

I have created a JPanel which contains an arbitrary number of JLabels, laid out with a left-aligned flow layout manager. Lets call this a FlowPanel. Each FlowPanel has a depth, and I would like to stack an arbitrary number of these FlowPanels on…
Eric Lindauer
  • 1,813
  • 13
  • 19
-1
votes
4 answers

JPanel flipping out, FlowLayout not working as intended

The other day this code was working. I changed some things and re-ran it and now it doesn't work as intended. Obviously something I changed altered the behaviour, but I have gone back and reverted all of those changes and it still doesn't work.…
Logan Serman
  • 29,447
  • 27
  • 102
  • 141
1 2 3
22
23