the below java code lauches a url in default browser. I wonder if there is a way to have more control on the browser opened window? i want to have the url opened in a new window with specific width and height. i tried doing this by Passing parameters argument but this has no effect.
is it possible to control the default web browser by asking for a new window with widthxheight?
thanks
Code: Select all
try {
// open the help web page
final Object xObject = mxMCF.createInstanceWithContext("com.sun.star.system.SystemShellExecute", m_xContext);
final XSystemShellExecute xSystemShellExecute = (XSystemShellExecute) UnoRuntime.queryInterface(XSystemShellExecute.class, xObject);
StringBuffer Parameters=new StringBuffer();
Parameters.append("new-window"+SPACE);
Parameters.append("height 600 "+SPACE);
Parameters.append("width 800");
if (xSystemShellExecute != null) {
xSystemShellExecute.execute(url, Parameters.toString(), SystemShellExecuteFlags.DEFAULTS);
}
} catch (Exception ex) {
ex.printStackTrace();
}
}