I create a JPopupMenu - menu, add two JMenuItems - a and b, and then set b to be selected i.e. menu.setSelected(b), but when I call menu.show(...), a is always shown as being selected, even though when I call menu.getSelectionModel.getSelectedIndex() it returns 1 !! What am I doing wrong ?
posted 12 years ago
Julie BBBB, Please change your displayed name to follow the <a href="http://www.javaranch.com/name.jsp" target="_blank">JavaRanch naming policy</a>. You can do this <a href="http://www.coderanch.com/forums/user/edit" target="_blank">here</a>. Thanks. BTW, posting your code will probably help people to help you with your problem.
The only reason for time is so that everything doesn't happen all at once.
- Buckaroo Banzai