Find centralized, trusted content and collaborate around the technologies you use most.
Teams
Q&A for work
Connect and share knowledge within a single location that is structured and easy to search.
我想设置通过 Eclipse RCP 创建的窗口的固定大小。如何实现?
parent.getShell(); body = form.getBody(); body.setBounds(500, 500, 350, 200);
您可以在类的preWindowOpen()方法中设置应用程序窗口的大小ApplicationWorkbenchWindowAdvisor
preWindowOpen()
ApplicationWorkbenchWindowAdvisor
public void preWindowOpen() { IWorkbenchWindowConfigurer configurer = getWindowConfigurer(); configurer.setInitialSize(new Point(500, 350)); }