Thank you very much for your advice.

Steffen Grund wrote:
> 
> Hello again,
> 
> I think this kind of question is better addressed to a Java-specific 
> forum. I see no relevance to OpenOffice.org here - a simple Java 
> application shows the same behaviour.
> 
> Regards, Steffen
> 
> wheelsdong wrote:
>> I am working on a OpenOffice Add-on to open a browser when mouse is
>> clicked
>> and Alt key is pressed at the same time.
>> 
>> public boolean mousePressed(MouseEvent mouseEvent) {
>>        
>>         if ((mouseEvent.Buttons == MouseButton.LEFT) &&
>> (mouseEvent.ClickCount == 1) && (mouseEvent.Modifiers ==
>> com.sun.star.awt.KeyModifier.MOD2)) {
>>             System.out.println("mousePressed, User pressed Alt key and
>> clicked mouse!");   
>>          desktop.browse(new URI("www.google.com"));
>>         }
>>                 
>>         return false;
>>     }
>> 
>> When desktop.browse is called, the default browser will be opened and the
>> url will be displayed.
>> 
>> Now I want to open a browser with a fixed size, say 600*600 pixels.
>> 
>> If you write the following url in the address bar, a fixed size window
>> will
>> be opened. 
>> 
>> javascript:document.mytrial=window.open('http://www.google.com/','mytrial','width=600,height=600');location.href=location.href;document.mytrial.focus();
>> 
>> But if the url is opened by desktop.browse(), a error message box will be
>> pop up from the browser.
>> 
>> Does anybody know how to solve this?
>> 
>> Thank you very much.
> 
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: [EMAIL PROTECTED]
> For additional commands, e-mail: [EMAIL PROTECTED]
> 
> 
> 

-- 
View this message in context: 
http://www.nabble.com/How-to-open-a-browser-with-fixed-size--tp20044375p20083424.html
Sent from the openoffice - api dev mailing list archive at Nabble.com.


---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to