Win a copy of Five Lines of Code this week in the OO, Patterns, UML and Refactoring forum!
  • 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 all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Bear Bibeault
  • Ron McLeod
  • Jeanne Boyarsky
  • Paul Clapham
Sheriffs:
  • Tim Cooke
  • Liutauras Vilda
  • Junilu Lacar
Saloon Keepers:
  • Tim Moores
  • Stephan van Hulst
  • Tim Holloway
  • fred rosenberger
  • salvin francis
Bartenders:
  • Piet Souris
  • Frits Walraven
  • Carey Brown

How to resize brower when Applet is resized?

 
Greenhorn
Posts: 8
  • Mark post as helpful
  • send pies
  • 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.
 
Marshal
Posts: 25669
69
Eclipse IDE Firefox Browser MySQL Database
  • Mark post as helpful
  • send pies
  • 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
  • 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
  • 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
Marshal
Posts: 25669
69
Eclipse IDE Firefox Browser MySQL Database
  • Mark post as helpful
  • send pies
  • 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
  • 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
Marshal
Posts: 25669
69
Eclipse IDE Firefox Browser MySQL Database
  • Likes 1
  • Mark post as helpful
  • send pies
  • 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).
 
A wop bop a lu bob a womp bam boom. Tutti frutti ad:
Thread Boost feature
https://coderanch.com/t/674455/Thread-Boost-feature
    Bookmark Topic Watch Topic
  • New Topic