JDK-6616809 : Nimbus L&F : Regression: JMenu vertical line is not black & thick in 6u5_b04 build
  • Type: Bug
  • Component: client-libs
  • Sub-Component: javax.swing
  • Affected Version: 6u5
  • Priority: P3
  • Status: Closed
  • Resolution: Duplicate
  • OS: generic
  • CPU: generic
  • Submitted: 2007-10-15
  • Updated: 2011-02-16
  • Resolved: 2008-01-04
Related Reports
Duplicate :  
Description
JMenu vertical line is not black & thick in 6u5_b04 build, but its correct in 6u5_b03 promoted build. Hence this is a regression introduced in pit 6u5_b04 build. 

I have attached the screen shot of the same , for both the builds.

Step to reproduce:
------------------
1) Run the Testcase which is below in nimbus LookAndFeel. You will see the frame.
2) Right click on the frame, so that popup is visible. Observe that Vertical line of the popup menu is not black. If you see the same then bug is reproduced.

You can even reproduce the bug in swingset2 also.
1) run the swingset2 in nimbus look&feel.
2) Click on 'Themes' Menu. & click on 'Audio' menu & observe that submenu's vertical line is not black. If you see the same then the bug is not reproduced.

Source Code
--------------
import javax.swing.JFrame;
import javax.swing.JPopupMenu;
import javax.swing.JMenu;
import javax.swing.JMenuItem;
import java.awt.event.*;

public class Bug6539458 {
	JFrame frame =null;
	JPopupMenu popup=null;
	JMenuItem menu1=null,menu2=null,menu3=null,menu4=null;

	Bug6539458() {
		frame = new JFrame();
		popup=new JPopupMenu();
		popup.add(menu1 = new JMenuItem("Menu1"));
		popup.add(menu2 = new JMenuItem("Menu2"));
		popup.add(menu3 = new JMenuItem("Menu3"));
		popup.add(menu4 = new JMenuItem("Menu4"));
		frame.addMouseListener(new PopupListener(popup));
		frame.setSize(250,250);
		frame.setVisible(true);
	}

	public static void main(String[]args){
		javax.swing.SwingUtilities.invokeLater(new Runnable(){
			public void run(){
				new Bug6539458();
			}
		});
	}

	static public class PopupListener extends MouseAdapter {
		JPopupMenu menu;

		public PopupListener(JPopupMenu menu ) {
		  this.menu = menu;
		}
		public void mousePressed(MouseEvent e) {showPopup(e);}
		public void mouseReleased(MouseEvent e) {showPopup(e);}
		private void showPopup(MouseEvent e) {
		  if(e.isPopupTrigger()) {
			menu.show(e.getComponent(), e.getX(), e.getY());
		  }
		}
    }

}
--------------