Reputation: 14449
I have just created an empty jface window. But for some reason there is separator at the top of the window:
With menu bar it looks pretty ok. But if there is no menu bar that separator is shown nevertheless!
How can it be eliminated?
UPD
class Application extends ApplicationWindow {
/**
* @param parentShell
*/
public Application() {
super(null);
}
@Override
protected Control createContents(final Composite parent) {
prepareShell(getShell());
return parent;
}
protected void prepareShell(final Shell shell) {
shell.setSize(450, 300);
}
}
and main class
public class Main {
/**
* @param args
*/
public static void main(String[] args) {
Application app = new Application();
app.setBlockOnOpen(true);
app.open();
Display.getCurrent().dispose();
}
}
Upvotes: 1
Views: 169
Reputation: 3412
You could extend Window, not Application window. The Window class doesn't have menu and status. Also you wouldn't have separator on the top of the screen.
Another way to solve the problem is to override the showTopSeperator() from ApplicationWindow
protected boolean showTopSeperator() {
return false;
}
Upvotes: 1