Win a copy of Practical SVG this week in the HTML/CSS/JavaScript forum!
  • Post Reply Bookmark Topic Watch Topic
  • New Topic

push flowlayout panel to the left.

 
Peter Primrose
Ranch Hand
Posts: 755
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
how can you push the panel to the left?

I have a flowLayout panel

JPanel p = new JPanel();
p.add(new JLabel("hi"));

I tried:
p.add(new JLabel("hi"), FlowLayout.LEFT) //didn't work.

anyone?
 
Michael Dunn
Ranch Hand
Posts: 4632
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
JPanel p = new JPanel(new FlowLayout(FlowLayout.LEFT));
p.add(new JLabel("hi"));
 
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!