JDK-4464897 : the menu is twinkling
  • Type: Bug
  • Component: client-libs
  • Sub-Component: javax.swing
  • Affected Version: 1.4.0
  • Priority: P1
  • Status: Closed
  • Resolution: Duplicate
  • OS: solaris_8
  • CPU: sparc
  • Submitted: 2001-06-01
  • Updated: 2001-06-01
  • Resolved: 2001-06-01
Related Reports
Duplicate :  
Description
Compile and run following codes:

import java.awt.*;
import java.awt.event.*;
import javax.swing.*;

public class TestJDK extends JFrame {
    int i = 0; 
    public TestJDK() {
        setTitle("Frame");
	JMenuBar mBar = new JMenuBar();
        JMenu menu = new JMenu("menu1");
        JMenuItem item = new JMenuItem("menuitem1");
        menu.add(item);
	menu.add(new JMenuItem("menuitem2"));
        mBar.add(menu);
	
        menu = new JMenu("menu2");
	menu.add(new JMenuItem("menuitem1"));
	menu.add(new JMenuItem("menuitem2"));
	mBar.add(menu);
	
	menu = new JMenu("menu3");
	menu.add(new JMenuItem("menuitem1"));
        menu.add(new JMenuItem("menuitem2"));
	mBar.add(menu);
				
	this.setJMenuBar(mBar);
        
	this.getContentPane().setLayout(new BorderLayout());
        pack();
        setSize(500,400);
        setVisible(true);
    }
    
    public static void main(String[] args) {
        new TestJDK();
    }
}

you will find under jdk1.2, every thing is ok, but under jdk1.4, when we browse menus, there are always some twinkling, it seems the whole frame is refreshed when move menus.

Comments
EVALUATION This is another manifestation of 4419252, closing as a duplicate. scott.violet@eng 2001-06-01
01-06-2001