wood burning stoves 2.0*
The moose likes Swing / AWT / SWT and the fly likes Layout is leaving some pixels on the right Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


Win a copy of Java 8 in Action this week in the Java 8 forum!
JavaRanch » Java Forums » Java » Swing / AWT / SWT
Bookmark "Layout is leaving some pixels on the right" Watch "Layout is leaving some pixels on the right" New topic
Author

Layout is leaving some pixels on the right

Francisco A Guimaraes
Ranch Hand

Joined: Mar 20, 2002
Posts: 182
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 ]

Francisco<br />SCJP<br />please use the [code][/code] tags when showing code.Click <a href="http://saloon.javaranch.com/cgi-bin/ubb/ultimatebb.cgi?ubb=ubb_code_page" target="_blank" rel="nofollow">here</a> to see an example.
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: Layout is leaving some pixels on the right
 
Similar Threads
Positioning JPanels in a JPanel
Problems with JSeparator together with GridBagLayout
GridLayout Vertical gap error
Line spacing
Swing: Unable to bring down the size of JPanel