| Author |
How to remove space around JSeparator
|
Andrew Keidel
Greenhorn
Joined: Dec 06, 2001
Posts: 27
|
|
I'm using JSeparators to draw lines between some panels in my GUI. I don't want to use borders because I only want lines between components, not completely around them (i.e., no lines around the outside edges of the GUI). The problem I'm having is this: With the preinstalled L&Fs (which I want to use), the horizontal JSeparator has empty space on either side of the line (not the case for the vertical JSeparator). I want to be able to draw a vertical line that goes right up to the horizontal line (touching it). However, a vertical JSeparator can't touch the horizontal JSeparator because of the hidden space surrounding the horizontal line. A visual example: I want to do this: _________ | | (vertical line meets horizontal one) | | But I can only do this: _________ <-- (I DON'T WANT THIS SPACE HERE) | | | | I want the vertical JSeparator to come right up and meet the horizontal one! Ideas?
|
 |
Nathan Pruett
Bartender
Joined: Oct 18, 2000
Posts: 4121
|
|
Sounds like you should make some custom borders... All you have to do is extend the interface javax.swing.border.Border and call setBorder( new MyCustomBorder() )... -Nate
|
-Nate
Write once, run anywhere, because there's nowhere to hide! - /. A.C.
|
 |
 |
|
|
subject: How to remove space around JSeparator
|
|
|