About Java applets sizes

George Staikos staikos at kde.org
Sat Feb 22 05:14:51 GMT 2003


On Friday 21 February 2003 18:30, Koos Vriezen wrote:
> Hi,
>
> Looking why kjas with kjavaappletviewer sometimes failed to correctly
> resize applets, I wondered why would this be needed in the first place.
>
> This is what happens when an applet is created:
> - a JFrame is created and a JPanel is added to the center of its
>   BorderLayout.
> - next a call to frame.pack() which resizes the frame to something small
> - the frame is embedded in a QXEmbed widget and resized by khtml
> - createApplet adds an applet in the center of the panel's BorderLayout
>
> So where does the resizing of the applet fit in? The only place I can
> justify is during the initialization phase of the applet, because it's
> hidden there. A resize of QXEmbed will automatically resize the applet
> because of the BorderLayout. (eg, an applet calls
> AppletStub.appletResize(w,h) and by kjas protocol this resizes the
> widget/kpart, BorderLayout resizes the applet).
>
> Attached a patch for testing which strips all this resizing (well
> most of it :) In my tree this makes kjavaappletviewer work more nicely
> with kjas.

  Do you have an example site where I can reproduce this behaviour?  I haven't 
been able to reproduce these problems recently.

-- 

George Staikos





More information about the kfm-devel mailing list