• Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other Pie Elite all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Tim Cooke
  • Campbell Ritchie
  • paul wheaton
  • Ron McLeod
  • Devaka Cooray
Sheriffs:
  • Jeanne Boyarsky
  • Liutauras Vilda
  • Paul Clapham
Saloon Keepers:
  • Tim Holloway
  • Carey Brown
  • Piet Souris
Bartenders:

How to resize brower when Applet is resized?

 
Greenhorn
Posts: 8
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
I know how to call a javascript function in Java. But I don't how to write this js function.
 
Sheriff
Posts: 28394
100
Eclipse IDE Firefox Browser MySQL Database
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
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
Posts: 8
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
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
Posts: 8
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator

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
Sheriff
Posts: 28394
100
Eclipse IDE Firefox Browser MySQL Database
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
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
Posts: 8
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator

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
Sheriff
Posts: 28394
100
Eclipse IDE Firefox Browser MySQL Database
  • Likes 1
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
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).
 
reply
    Bookmark Topic Watch Topic
  • New Topic