Re: Problem resizing applet frame

From: ScoobyCed (smell_at_my.ass)
Date: 12/10/03


Date: Wed, 10 Dec 2003 17:26:42 +0700


"Kevin Holmes" <khomer@telus.net> wrote in message
news:0NwBb.34713$d35.3080@edtnps84...
> I can't seem to get this darn frame to resize (or setsize) when the applet
> is launched. All I get is a little frame window which I can then maximize
> and see my applet. I think I have tried ever possible combination of the
> Frame methods. Could someone please lend a helping hand.
>

The problem is not in the Java code, that's why you don't see it they way
you want. You have to precise the stuff in the HTML <applet> code and in the
code that open the browser windows.
For the first case, use the parameters width='' and height='', this will
tell the browser what size the applet is using within the web page.
For the second thing, you have to do something like:
window.open("applet.html","text","width=640,height=480");
check the javascript code for window.open() method.
or use the myWindow.resize(640,480); method on a window JS object.

Scooby-Ced



Relevant Pages

  • Re: opening a window from an applet..
    ... (public class extends JFrame?) ... if it's a JFrame instead of an applet does it still have to have initmethod? ... (can I open a swing window from an applet? ... Which is a frame like any other. ...
    (comp.lang.java.gui)
  • Re: Communication between applets in seperate browswer windows?
    ... > several browser windows and then has to be notified whenever something ... > lifetime-changes to the main applet... ... This is what i would try in Javascript - if Java code in applets don't allow ... Say one applet is in a browser window, that can be referenced in javascript ...
    (comp.lang.java.programmer)
  • Wie bekomme ich Tastatureingaben in einem Window?
    ... Ich habe jetzt mein Applet in einer normalen Anwendung zum Laufen ... und habe dafuer zuerst ein Frame ... Menueleiste und keinen Rahmen haben will, habe ich stattdessen ... ein Window genommen, und dieses in ein unsichtbares Frame eingehaengt ...
    (de.comp.lang.java)
  • Re: applets call comportement
    ... i think there's to be somewhere an address where the applet find the ... So if we do a child myFrame of frame, ... an OS-depedent window... ...
    (comp.lang.java.programmer)
  • Re: MenuBar in AWT Java Applets
    ... It's an applet "floating" in its own frame (window), ... which is "sitting" on the HTML page itself. ...
    (comp.lang.java.help)