Have you tried the method setSize()from WebDriver.Window? Here is the documentation.
import org.openqa.selenium.Dimension;
WebDriver driver = new PhantomJSDriver();
driver.manage().window().setSize(new Dimension(1920, 1080));
driver.get("http://stackoverflow.com/questions/21743350/how-to-set-screen-window-size-when-using-ghostdriver");
source
share