问题描述:   需要嵌入火狐浏览器..
  嵌IE 一切正常.嵌火狐
  browser 对象无法响应键盘事件.
  
  以下是具体代码 public void createPartControl(Composite parent) {
final Shell shell = parent.getShell();

final Composite container = new Composite(parent, SWT.NONE);
final Composite composite = new Composite(container, SWT.NONE);
composite.setLayout(new FillLayout());
final Rectangle rectangle = Display.getCurrent().getClientArea();
composite.setSize(rectangle.width-10, 30);
composite.setLocation(0,rectangle.height-10);

final Label label = new Label(composite, SWT.RIGHT);
label.setSize(composite.getBounds().width, composite.getSize().y);
label.setBackground(null);
final Browser browser = new Browser(container, SWT.MOZILLA);
browser.setBounds(-2, 0, rectangle.width-10, rectangle.height+30);
container.setSize(rectangle.width, rectangle.height+30);
browser.setUrl("http://www.baidu.com");
//实现字符滚动插播消息
Timer timer = new Timer();
ATask task = new ATask();
task.setLabel(label);
task.setShell(shell);
task.setTimer(timer);
task.setAllText(label.getText());
timer.schedule(task,3,300);
browser.addKeyListener(new KeyAdapter() {
public void keyReleased(final KeyEvent e) {
if (e.keyCode == SWT.F1) {//弹出设置窗体
OperationWin operationWin = new OperationWin(PlatformUI
.createDisplay(), SWT.SHELL_TRIM
| SWT.APPLICATION_MODAL);
operationWin.open();
} else if (e.keyCode == SWT.ESC) { // 切换全屏
if(isMax){
shell.setBounds(rectangle.width/2-rectangle.width/4, (rectangle.height+30)/2-(rectangle.height+30)*3/5/2, rectangle.width/2, (rectangle.height+30)*3/5);
browser.setBounds(0, 0, shell.getSize().x-14, shell.getSize().y-30);
}else{
shell.setBounds(-2, -30, rectangle.width+4, rectangle.height+60);
browser.setBounds(-2, 0, rectangle.width-14, rectangle.height+30);
}
isMax = !isMax;
}

}
});
}