Java实现窗体右键菜单,简约易操作的窗体菜单,这是一个相当易懂的制作实例。   super( "右键弹出菜单" ); //调用父类构造函数   ChangeColorAction action = new ChangeColorAction(); //菜单项事件处理   String[] str = {"Blue","Pink","Yellow","Red","Orange"}; //菜单项名称   ButtonGroup colorGroup=new ButtonGroup(); //实例化按钮组   popupMenu=new JPopupMenu(); //实例化弹出菜单