problems with awt
I am in the Middle of implementing a method in a tutorial excercise. The complier flags much of syntax as incorrect, however the code appears fine to me.
below is the method :
publicvoid createPartControl(Composite parent){
Composite top =new Composite(parent, SWT.NONE);
GridLayout layout =new GridLayout();
layout.marginWidth = 0;
layout.marginHeight = 0;
top.setLayout(layout);
transcript =new Text(top, SWT.BORDER | SWT.MULTI | SWT.WRAP);
transcript.setLayoutData(new GridData(GridData.FILL, GridData.FILL, true,true));
transcript.setEditable(false);
transcript.setBackground(transcript.getDisplay().getSystemColor(SWT.COLOR_INFO_BACKGROUND));
transcript.setForeground(transcript.getDisplay().getSystemColor(SWT.COLOR_INFO_FOREGROUND));
entry =new Text(top, SWT.BORDER | SWT.WRAP);
GridData gridData =new GridData(GridData.FILL, GridData.FILL, true,false);
gridData.heightHint = entry.getLineHeight() * 2;
entry.setLayoutData(gridData);
entry.addKeyListener(Listener)(new KeyAdapter(){
publicvoid keyPressed(KeyEvent event){
if (event.character == SWT.CR){
sendMessage();
event.doit =false;
}
}
});
}
Can anyone see fromthis code anyone obvious errors.

