Skip to main content


Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Eclipse Projects » WindowBuilder » Parser error(WindowBuilder does not show anything)
Parser error [message #1789986] Fri, 01 June 2018 14:52
Andre Töllner is currently offline Andre TöllnerFriend
Messages: 1
Registered: June 2018
Junior Member
Helllo,

I experience a Problem with WindowBuilder every time I try to add a SWT.DROP_DOWN menu to a shell. I managed to put a workaround in place as you may see.

protected void createContents() {
	shlMatrikelex = new Shell(display);
	shlMatrikelex.setSize(450, 300);
	shlMatrikelex.setText("MatrikelEx");
		
	Menu menuBar = new Menu(shlMatrikelex, SWT.BAR);
	shlMatrikelex.setMenuBar(menuBar);	

	fileMenuHeader = new MenuItem(menuBar, SWT.CASCADE);
	fileMenuHeader.setText("&File");
		
	//$hide>>$
		
        fileMenu = new Menu(shlMatrikelex, SWT.DROP_DOWN);	    
        fileMenuHeader.setMenu(fileMenu);
		    
	fileOpenItem = new MenuItem(fileMenu, SWT.PUSH);
	fileOpenItem.setText("&Open");
	
	fileSaveItem = new MenuItem(fileMenu, SWT.PUSH);
	fileSaveItem.setText("&Save");
	
	fileExitItem = new MenuItem(fileMenu, SWT.PUSH);
	fileExitItem.setText("E&xit");
		    
	helpMenuHeader = new MenuItem(menuBar, SWT.CASCADE);
	helpMenuHeader.setText("&Help");
	
	helpMenu = new Menu(shlMatrikelex, SWT.DROP_DOWN);
	helpMenuHeader.setMenu(helpMenu);
	
	helpGetHelpItem = new MenuItem(helpMenu, SWT.PUSH);
	helpGetHelpItem.setText("&Get Help");
		
	//$hide<<$

	shlMatrikelex.setMenuBar(menuBar);
					   
	fileOpenItem.addSelectionListener(new fileOpenItemListener());
	fileSaveItem.addSelectionListener(new fileSaveItemListener());
	fileExitItem.addSelectionListener(new fileExitItemListener());
}


Is there a way to get things done without that kind of workaround?

Why can't WindowBuilder show things properly?

Best Regards,
AndToe
Previous Topic:"Incompatible Java versions"
Next Topic:Method setColumnHeader(javax.swing.JViewport) not found in class javax.swing.JPanel
Goto Forum:
  


Current Time: Wed Sep 26 13:08:45 GMT 2018

Powered by FUDForum. Page generated in 0.02145 seconds
.:: Contact :: Home ::.

Powered by: FUDforum 3.0.2.
Copyright ©2001-2010 FUDforum Bulletin Board Software

Back to the top