0

enter image description here

        panel1.setLayout(new FlowLayout()); 
        panel1.add(hp_label);
        panel1.add(health_field);

        panel1.add(money_label);
        panel1.add(money_field);

I would like to put the Money_label in the next line inline with the money_field.

PNC
  • 357
  • 1
  • 5
  • 19
  • 1
    http://stackoverflow.com/questions/6238309/swing-flow-layout-break-element – schlagi123 Aug 21 '14 at 09:01
  • @schlagi123 I used the GridLayout now the problem is the text fields are too big and they fit the panel – PNC Aug 21 '14 at 09:08
  • I would use the GridBagLayout (http://docs.oracle.com/javase/tutorial/uiswing/layout/gridbag.html). There is an attribute for this (fill) – schlagi123 Aug 21 '14 at 09:23

0 Answers0