This week's book giveaway is in the Clojure forum.
We're giving away four copies of Clojure in Action and have Amit Rathore and Francis Avila on-line!
See this thread for details.
Win a copy of Clojure in Action this week in the Clojure forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

Can't control BoxLayout when adding JTableHeader

 
Jim Hoglund
Ranch Hand
Posts: 525
  • 0
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Good morning to all. I'm having BoxLayout trouble. In this code the header demands
extra space on the right and the table body demands extra space on the left. But I need
the box to be as narrow as possible. (I'm adding a border to see the box size.) I've been
avoiding using a JScrollPane. Any ideas?

Jim ...
 
Jim Hoglund
Ranch Hand
Posts: 525
  • 0
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Careful attention to component alignment and sizes eventually solved the problem. Adding
borders to each container, and printing MIN, PREFERRED, MAX sizes to the console helped
to see that was going on. The Box class is very handy and seems easy to work with. I can
elaborate further on where I ended up, if anyone is interested. Also, I wonder what others
think about the Group layout manager.

Jim...
 
I agree. Here's the link: http://aspose.com/file-tools
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic