Granny's Programming Pearls
"inside of every large program is a small program struggling to get out"
JavaRanch.com/granny.jsp
Win a copy of Kotlin in Action this week in the Kotlin forum!
  • Post Reply Bookmark Topic Watch Topic
  • New Topic

Layout is leaving some pixels on the right  RSS feed

 
Francisco A Guimaraes
Ranch Hand
Posts: 182
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi everybody, I'm having a problem with drawing a "window" inside a JPanel.

This "window" will have a header and a body. The problem is that on the header, there is a space of a couple pixels unused so the header doesn't stay aligned with the body. The header is a JPanel with GridLayout, the "window" uses a BorderLayout and the frame uses a null layout. Below is the test code I wrote.If you run it, you'll see that there's a minimal yellow line after the magenta border, that's the background color, so the panel isn't using all the space. Can anyone help on this?

Francisco


[ October 14, 2004: Message edited by: Francisco A Guimaraes ]
 
With a little knowledge, a cast iron skillet is non-stick and lasts a lifetime.
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!