org.eclipse.swt.widgets.Button click from code
我正在尝试从代码中单击按钮。我正在绑定执行以下操作:
class MyMouseAdapter extends MouseAdapter
{
public void mouseDown(MouseEvent evt)
{
System.out.println("Working!!!!");
}
}
Button button = new Button();
button.addMouseListener(new MyMouseAdapter());
现在我想从代码中运行mouseDown方法,你能告诉我怎么做吗?
谢谢。