This week's book giveaway is in the HTML/CSS/JavaScript forum.
We're giving away four copies of Practical SVG and have Chris Coyier on-line!
See this thread for details.
Win a copy of Practical SVG this week in the HTML/CSS/JavaScript forum!
  • Post Reply Bookmark Topic Watch Topic
  • New Topic

Flowlayout troubles

 
Honzak Troubak
Ranch Hand
Posts: 31
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hello,

I need help with FlowLayout. I have three component which I would like to put on the panel. First and second component are short so they could be on one line a third component long so it should be on new (second) line.



For my requirement should serve FlowLayout which puts component consecutively. But my problem is that on panel is probably one line so third component is not seen.



When I remove first and second component from panel, third component is seen.

Could anybody tell me how show all components that first and second are on one line (on the left and on the right) a third component on new line?

Thank you
 
Campbell Ritchie
Marshal
Posts: 52621
119
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
I don't think flow layout is any good. It is certainly no good for what you want, with two rows. Try Border with the WEST EAST and SOUTH positions.
 
Honzak Troubak
Ranch Hand
Posts: 31
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
You are right! It is the easiest and best way. I am silly because I tried more than two hours how set up FlowLayout. Thanks!
 
Campbell Ritchie
Marshal
Posts: 52621
119
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
You're welcome

You can read about different layouts here.
 
Bernhard Goetz
Ranch Hand
Posts: 57
1
Java Netbeans IDE Oracle
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi,
Rob Carmick posted an implementation of his WrapLayout a while ago. I believe it's exactly what you are looking for. This blog is in general a very nice resource for gui related tweaking.

Regard,
Bernhard

Edit: I like the style of your JTables on the screenshot. May I know how you achieved it? Is it a special look and feel?
 
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!