0

I have developed an SWT application on windows and when i try it MAC OS X Mavericks , the SWT menu bar behaves strangely.It does not show up immediately.But if i minimize the app,click somewhere on the desktop and maximize the app,the menu works perfectly.How do i fix this weird behaviour?

PS: I have already seen this Eclipse menus disabled on OS X 10.9 Beta 6 and it dint solve my issue.

A part of my code looks like this

public class Dummy2 {
public static void main(String args[])
{
    Display display= new Display();
    Shell shell= new Shell();

    Menu bar= new Menu(shell,SWT.BAR);
    shell.setMenuBar(bar);

    MenuItem fileitem=new MenuItem(bar,SWT.CASCADE);
    MenuItem edititem=new MenuItem(bar,SWT.CASCADE);
    MenuItem helpitem=new MenuItem(bar,SWT.CASCADE);

    fileitem.setText("File");
    edititem.setText("Edit");
    helpitem.setText("Help");


    shell.open();
    while (!shell.isDisposed()) {
        if (!display.readAndDispatch())
            display.sleep();
    }

    display.dispose();
}
}
Community
  • 1
  • 1
user3873909
  • 191
  • 1
  • 3
  • 15
  • Show us the code where you create the menus, preferably in a small, runnable, example program. – greg-449 Sep 08 '14 at 07:24
  • Is this just when running the program from within Eclipse? That may be the same as http://stackoverflow.com/q/19803332/2670892 – greg-449 Sep 08 '14 at 08:01

0 Answers0