JSeparator

How to achieve red JSeparator between two JMenuItems ? The point is that the saparator should be position in the center and its egdes should not touch menu's edges.
[172 byte] By [Pabloooa] at [2007-11-27 4:58:13]
# 1
Try JMenu.addSeparator() ... it is black ... but maybe if you change the foregroundcolor of the JMenu it will be red...
Oleka at 2007-7-12 10:14:02 > top of Java-index,Desktop,Core GUI APIs...
# 2

The problem is not the color of my JSepartor. I want to have the line which is not a full standard separator's line. The sepalator I need to have is a line positioned in the center between the two MenuItems. Such line should not touch egdes of menu neigther from the left nor from the right side. I tride to setMaximumSize() of my separator and now it does not touch the right menu's edge. However, it is almost impossible to achieve the same effect from the left side. I would be very grateful for some advise ... :)

Pabloooa at 2007-7-12 10:14:02 > top of Java-index,Desktop,Core GUI APIs...
# 3

Show us what you've tried, so we can see what the problem is. "A picture is worth a thousand words".

If you need further help then you need to create a [url http://homepage1.nifty.com/algafield/sscce.html]Short, Self Contained, Compilable and Executable, Example Program[/url] (SSCCE) that demonstrates the incorrect behaviour, because I can't guess exactly what you are doing based on the information provided.

Don't forget to use the [url http://forum.java.sun.com/help.jspa?sec=formatting]Code Formatting Tags[/url] so the posted code retains its original formatting.

camickra at 2007-7-12 10:14:02 > top of Java-index,Desktop,Core GUI APIs...