aspose file tools*
The moose likes Applets and the fly likes How to resize brower when Applet is resized? Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


Win a copy of Java 8 in Action this week in the Java 8 forum!
JavaRanch » Java Forums » Java » Applets
Bookmark "How to resize brower when Applet is resized?" Watch "How to resize brower when Applet is resized?" New topic
Author

How to resize brower when Applet is resized?

Steve Clark
Greenhorn

Joined: Feb 26, 2009
Posts: 8
I know how to call a javascript function in Java. But I don't how to write this js function.
Paul Clapham
Bartender

Joined: Oct 14, 2005
Posts: 18155
    
    8

So would it be correct to say that your question is "What is the Javascript code which allows me to resize the browser window?"

Hopefully there isn't any -- I set my browser window the way I like it and I don't want your code messing with that -- but at any rate that question doesn't seem to be related to applets in any way. So let's move it to the Javascript forum. But if it turns out I have completely misinterpreted your question, just post a clarification and we'll move it again, if necessary.
Steve Clark
Greenhorn

Joined: Feb 26, 2009
Posts: 8
I think it is a applet problem. The problem here is how to caculate the brower's size when the applet is resized.

Maybe there are some better solutions don't need call javascript function.
Steve Clark
Greenhorn

Joined: Feb 26, 2009
Posts: 8
Paul Clapham wrote:So would it be correct to say that your question is "What is the Javascript code which allows me to resize the browser window?"

Hopefully there isn't any -- I set my browser window the way I like it and I don't want your code messing with that -- but at any rate that question doesn't seem to be related to applets in any way. So let's move it to the Javascript forum. But if it turns out I have completely misinterpreted your question, just post a clarification and we'll move it again, if necessary.


I think it is a applet problem. The problem here is how to caculate the brower's size when the applet is resized.
Maybe there are some better solutions don't need call javascript function.
Can I post this problem in both html and applet forums.
Paul Clapham
Bartender

Joined: Oct 14, 2005
Posts: 18155
    
    8

Sure, I will move it back to the Applets forum. You seem to get distracted by irrelevancies, though... would it be fair to say your question is "How can an applet find out the size of the browser it's running in"? (After all you're going to use the same method to find the browser's size regardless of whether the applet has been resized lately or not.)
Steve Clark
Greenhorn

Joined: Feb 26, 2009
Posts: 8
Paul Clapham wrote:Sure, I will move it back to the Applets forum. You seem to get distracted by irrelevancies, though... would it be fair to say your question is "How can an applet find out the size of the browser it's running in"? (After all you're going to use the same method to find the browser's size regardless of whether the applet has been resized lately or not.)


My applet can changed size when the font is changed. So the browser need change to correct size to fit the applet.
Paul Clapham
Bartender

Joined: Oct 14, 2005
Posts: 18155
    
    8

So you really have three separate problems:

(1) How can your applet find the size of the browser it's embedded in?

(2) How can your applet determine the desired size of the browser based on its own size requirements?

(3) How can your applet change the size of the browser it's embedded in?

If you look at the API documentation for AppletContext -- which is the interface between the applet and its container -- you'll see that those questions aren't addressed there. So programming in the applet isn't going to answer them. Conceivably they might be solved by Javascript called from the applet.

And a couple of minutes of googling did produce answers to (1) and (3).
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: How to resize brower when Applet is resized?
 
Similar Threads
datas into javascripts..
Problem in calling javascript function
how to create tablespace in java dbms
How to resize brower when Applet is resized?
passing java array to javascript