[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[news.eclipse.platform.swt] PGroup not displaying content when Shell size is set

Hi all,

I'm replacing a Group with a TextArea with PGroup, and would like to make the Shell expand when the PGroup is expanded.

I've added an ExpandListener:

group.addExpandListener(new SelectionAdapter() {
		
	@Override
	public void widgetSelected(SelectionEvent e) {
		if(group.getExpanded()) {
			sShell.setSize(428, 325);
			sShell.update();
		} else {
			sShell.setSize(428, 234);
			sShell.update();					
		}
	}
	
});

When I click the PGroup bar to expand, I'm getting a ClassCastException:

Exception in thread "main" java.lang.ClassCastException: tools.WSDLPostProcessor$9
at org.eclipse.swt.widgets.TypedListener.handleEvent(TypedListener.java:191)


....

	at org.eclipse.swt.widgets.Display.readAndDispatch(Display.java:2842)
	at com.bac.cbl.tools.WSDLPostProcessor.main(WSDLPostProcessor.java:381)


Seems like this should take an ExpandListener/Adapter.

Any ideas appreciated,

Todd