File APIs for Java Developers
Manipulate DOC, XLS, PPT, PDF and many others from your application.
The moose likes Swing / AWT / SWT and the fly likes Browser window size from Applet Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login
JavaRanch » Java Forums » Java » Swing / AWT / SWT
Bookmark "Browser window size from Applet" Watch "Browser window size from Applet" New topic

Browser window size from Applet

Anvi Chattopadhyay

Joined: Nov 24, 2003
Posts: 2
I am trying to open a new browser window using the applet's showDocument call.
My problem is -in Netscape the new window open full size, but in IE it opens half-size.
I want it full-size/maximised!!
How do i control the size of IE window from the applet???
Increasing the size of applet does not help!
Pleeease help me!
Dave Robbins
Ranch Hand

Joined: Sep 16, 2003
Posts: 131
Hi Anvi,
I don't see a showDocument function in the JApplet API.
I've solved a similar problem by calling javascript functions in the page that hosts the applet. Docs for doing that are here.
Anwesha Chattopadhyay

Joined: Nov 24, 2003
Posts: 1
Hi ,
I am using the showDocument in AppletContext's API. I cannot use Java Script. Is it possible to do the same with simple Java applet??
Thanks a lot ,
Nathan Pruett

Joined: Oct 18, 2000
Posts: 4121

You don't have that level of control over how the browser will handle (or even if it actually *will* handle) the showDocument() call. The new window is probably just the default or the last size the application was at. I don't think there's any way to control this.

Write once, run anywhere, because there's nowhere to hide! - /. A.C.
I agree. Here's the link:
subject: Browser window size from Applet
It's not a secret anymore!