JCheckBoxMenuItem doesn't show the checkbox

Hi,
I'm trying to add a JCheckBoxMenuItem to a popup menu. I'm using jdk1.4 and the Windows L&F. The checkbox portion of the JCheckBoxMenuItem doesn't show up; all I see are the words associated with the check box. Any help would be greatly appreciated.
Thanks,
Angella
private void createPopup(Point p) {
JMenuItem item;
popup = new JPopupMenu();
JCheckBoxMenuItem checkItem = new JCheckBoxMenuItem("Show Labels");
popup.add(checkItem);
if xxx== null || xxx.equals(""))
checkItem.setEnabled(false);
checkItem.addActionListener(new ActionListener(){
public void actionPerformed(ActionEvent e){
JCheckBoxMenuItem temp = ((JCheckBoxMenuItem)(e.getSource()));
setShowLabels(temp.isSelected());
checkItem = new JCheckBoxMenuItem("ShowTypes");
popup.add(checkItem);
if (xxx == null || xxx.equals(""))
checkItem.setEnabled(false);
checkItem.addActionListener(new ActionListener(){
public void actionPerformed(ActionEvent e){
JCheckBoxMenuItem temp = ((JCheckBoxMenuItem)(e.getSource()));
setType(temp.isSelected());
popup.show(this, p.x, p.y);

Angella,
Did you ever overcome this limitation in the windows l&f. I would also like to show an empty checkbox on the menu item to indicate that the menu item is "checkable". Did you find a way to do this?
Thanks,
Troy

Similar Messages

Maybe you are looking for

  • Problem using ddd with emacs

    Dear all, I am using emacs in conjunction with ddd to debug C codes on  my laptop I normally enter gdb commands on the tty in emacs, watch the position in the source code in emacs and look variable states in ddd. For some reason I can not enter gdb c

  • Up graded to windows 7 need my apps in new itunes

    I installed windows 7 on my computer is there anyway to get all the stuff i had in my old itunes to transfer to my new itunes. i backed up everything on old hard drive. i want all my apps that were on the old itunes on my new one.

  • Strange Beep When Shutting Down

    Today, when shutting down Windows, I received a strange beep from my MSI Mega 865.  I checked the temp, and it's only 48C.  Any ideas on what would make it beep when it shuts down? Note:  This noise came as soon as I chose to shut down, and prior to

  • Regarding the invoice block

    Hi, I have a scenario I create a PO for 10 quantity. The Goods receipt is for the 15 quantity which is within the tolerance limit of the the PO. Now the requirement is to allow the GR but the invoice is to be blocked unless and until the PO is amende

  • Allowing user to see a newly created table

    Hi , I have created a new table tbl1 in tblspace1 and grant select , delete , insert to user1 how can i allow the user1 to see the new table tbl1 ? kindly advise tks & rdgs