🚀 go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

Thread View: pl.comp.lang.java
12 messages
12 total messages Started by Thomas de Massy Sat, 13 Sep 1997 06:47
How to resize an applet in a browswer?
#991
Author: Thomas de Massy
Date: Sat, 13 Sep 1997 06:47
19 lines
1366 bytes
Can someone help me find out how can
I resize an applet in a HTML doc when
the applet is running ?

I use the resize method but it doesn't
refresh the applet in the HTML doc.
the size variables seems to have changed
but the applet looks the same.

Is there a way to refresh the HTML doc ?

thanks
P.S. Please send the answer by email too.

-- 
----------------------------- KRUST--------------------------------
Thomas de Massy (Krusty)
tomasd@axess.com
http://www.geocities.com/SoHo/Studios/4407/
Re: How to resize an applet in a browswer?
#992
Author: Carlos Blanco
Date: Tue, 16 Sep 1997 00:27
11 lines
1282 bytes
>Can someone help me find out how can
>I resize an applet in a HTML doc when
>the applet is running ?

I don't think what you're asking for is too likely.  Most existing browsers
don't allow you to reformat or alter the page after it's been loaded.  IE4
does support on-the-fly dynamic changing of all HTML elements and tags, but
I've never tried resizing applets that way so I don't know whether it would
work.

 --Carlos (carlosbl at microsoft.com)
Re: How to resize an applet in a browswer?
#997
Author: Cynthia Zujko-Miller
Date: Tue, 16 Sep 1997 04:14
30 lines
1688 bytes
Thomas de Massy wrote:
> 
> Can someone help me find out how can
> I resize an applet in a HTML doc when
> the applet is running ?
> 
> I use the resize method but it doesn't
> refresh the applet in the HTML doc.
> the size variables seems to have changed
> but the applet looks the same.

You can use a Frame object to hold all of the applet components and
allow the frame to be resizable. (Of course, this appears as its own
window, separate from the browser window...) Just have the applet setup
the frame in its init method.

// untested code:
public class MyApplet extends Applet
{
Frame frame = new Frame();
List list = new List(); // or whatever

public void init()
	{
	frame.setLayout...
	frame.add(list);
	frame.setResizable(true);
	frame.show();
	}
}
Re: How to resize an applet in a browswer?
#993
Author: Artur Tyloch
Date: Tue, 16 Sep 1997 13:56
16 lines
1368 bytes
Carlos Blanco wrote:
> 
> >Can someone help me find out how can
> >I resize an applet in a HTML doc when
> >the applet is running ?
> 
> I don't think what you're asking for is too likely.  Most existing browsers
> don't allow you to reformat or alter the page after it's been loaded.  IE4
> does support on-the-fly dynamic changing of all HTML elements and tags, but
> I've never tried resizing applets that way so I don't know whether it would
> work.
Why M$ VJ++ in default applet (generated by applet wizard) exist method
resize() which doesn't work? {:)
> 
>  --Carlos (carlosbl at microsoft.com)
Artur
Re: How to resize an applet in a browswer?
#994
Author: Cafebabe
Date: Tue, 16 Sep 1997 22:36
23 lines
1598 bytes
Artur Tyloch wrote:
> 
> Carlos Blanco wrote:
> >
> > >Can someone help me find out how can
> > >I resize an applet in a HTML doc when
> > >the applet is running ?
> >
> > I don't think what you're asking for is too likely.  Most existing browsers
> > don't allow you to reformat or alter the page after it's been loaded.  IE4
> > does support on-the-fly dynamic changing of all HTML elements and tags, but
> > I've never tried resizing applets that way so I don't know whether it would
> > work.
> Why M$ VJ++ in default applet (generated by applet wizard) exist method
> resize() which doesn't work? {:)
> >
> >  --Carlos (carlosbl at microsoft.com)
> Artur

Use Applet.resize(width, height)!

cafebabe
living on www.culture.page.org/cafebabe
Re: How to resize an applet in a browswer?
#998
Author: Ian Macgregor
Date: Wed, 17 Sep 1997 12:44
37 lines
2059 bytes
Set your <APPLET WIDTH = HEIGHT = > parameters to the largest size you
expect the applet to grow and match the applet's (and any panels,
canvases etc...) setBackground() to the exact same colour  as the
BGCOLOR of the html page. That will make it look like whatever is being
displayed is growing. Otherwise, I believe, the answer is "no you can't
refresh the html page to resize the width and the hieght of the applet
on the page.

Thomas de Massy wrote:

> Can someone help me find out how can
> I resize an applet in a HTML doc when
> the applet is running ?
>
> I use the resize method but it doesn't
> refresh the applet in the HTML doc.
> the size variables seems to have changed
> but the applet looks the same.
>
> Is there a way to refresh the HTML doc ?
>
> thanks
> P.S. Please send the answer by email too.
>
> --
> ----------------------------- KRUST--------------------------------
> Thomas de Massy (Krusty)
> tomasd@axess.com
> http://www.geocities.com/SoHo/Studios/4407/



--
Ian Macgregor
Grand Poohbah, 2nd Class
Club Upstairs Productions - Internet Services
imac@defaulthomepage.com    http://www.defaulthomepage.com/
Re: How to resize an applet in a browswer?
#995
Author: Achim Luczyk
Date: Wed, 17 Sep 1997 13:42
18 lines
1589 bytes
Carlos Blanco wrote:
> 
> >Can someone help me find out how can
> >I resize an applet in a HTML doc when
> >the applet is running ?
> 
> I don't think what you're asking for is too likely.  Most existing browsers
> don't allow you to reformat or alter the page after it's been loaded.  IE4
> does support on-the-fly dynamic changing of all HTML elements and tags, but
> I've never tried resizing applets that way so I don't know whether it would
> work.
> 
>  --Carlos (carlosbl at microsoft.com)

It would not work, because the browser don't allow to resize the page as
you say above.

Bye....
Re: How to resize an applet in a browswer?
#996
Author: Gerhard Pratl
Date: Thu, 18 Sep 1997 14:38
17 lines
1750 bytes
> > I don't think what you're asking for is too likely.  Most existing browsers
> > don't allow you to reformat or alter the page after it's been loaded.  IE4
> > does support on-the-fly dynamic changing of all HTML elements and tags, but
> > I've never tried resizing applets that way so I don't know whether it would
> > work.
> It would not work, because the browser don't allow to resize the page as
> you say above.

*scratch* *scratch* hmmm, what do you mean by that? IE4 - the great new
gadget of Big Billy - allows you to add, remove or modify any text or HTML
tag in a page. I admit that its a rather bizarre idea, but IMHO it would
work to modify the <APPLET> tag in a page to resize an applet. Although
this would of course only do the trick in IE40 - not very platform
independent then.

Greeting
Gerhard
Re: How to resize an applet in a browswer?
#999
Author: Vy Ho
Date: Tue, 23 Sep 1997 13:09
12 lines
1442 bytes
This is the best idea I've see.  I will probably use it in my applet. 
Thanks.

Ian Macgregor wrote:
> 
> Set your <APPLET WIDTH = HEIGHT = > parameters to the largest size you
> expect the applet to grow and match the applet's (and any panels,
> canvases etc...) setBackground() to the exact same colour  as the
> BGCOLOR of the html page. That will make it look like whatever is being
> displayed is growing. Otherwise, I believe, the answer is "no you can't
> refresh the html page to resize the width and the hieght of the applet
> on the page.
Re: How to resize an applet in a browswer?
#1000
Author: Dino Morelli
Date: Thu, 25 Sep 1997 03:05
23 lines
1933 bytes
That's not entirely true. You can use <APPLET WIDTH=100% HEIGHT=100%...
and it will size the applet to fit the browser window. And you can resize the 
browser and reload the page to change it. But that's the first catch, you have 
to basically dump that execution of that applet and re-run it from the top.

The other catch  that I don't think this works in anything but IE. Not sure 
about that, though.


In article <3427BF92.7F4A@dunx1.ocs.drexel.eduxxx>, 
st946tbf@dunx1.ocs.drexel.eduxxx wrote:
>This is the best idea I've see.  I will probably use it in my applet. 
>Thanks.
>
>Ian Macgregor wrote:
>> 
>> Set your <APPLET WIDTH = HEIGHT = > parameters to the largest size you
>> expect the applet to grow and match the applet's (and any panels,
>> canvases etc...) setBackground() to the exact same colour  as the
>> BGCOLOR of the html page. That will make it look like whatever is being
>> displayed is growing. Otherwise, I believe, the answer is "no you can't
>> refresh the html page to resize the width and the hieght of the applet
>> on the page.
Re: How to resize an applet in a browswer?
#1003
Author: Robert Olofsson
Date: Thu, 25 Sep 1997 17:26
26 lines
2006 bytes
Thomas de Massy (tomasd@axess.com) wrote:
: Can someone help me find out how can
: I resize an applet in a HTML doc when
: the applet is running ?

: I use the resize method but it doesn't
: refresh the applet in the HTML doc.
: the size variables seems to have changed
: but the applet looks the same.

: Is there a way to refresh the HTML doc ?

Havent tried this one but it should work.
Make the page be a CGI-prog that takes widht and height as
params. Then to resize the applet simply call:
myapplet.showdocument ("mydocument?width=newwidth&height=newheight");
sinze the applet is already loaded the page should show itself
kinda quickly...

/robo -WebChess Tiger-
******************************************************************************
Robert Olofsson  * d94-rol@nada.kth.se 	*        "Your eyes can deceive you 
Flygkårsv 5,1 	 * robo@isk.kth.se   	*          use the force."
183 62 Täby    	 * tel: 08-732 71 39	*                   /Obi-Wan-Kenobi
Sweden           * http://www.nada.kth.se/~d94-rol    
****************************************************************************** 
Re: How to resize an applet in a browswer?
#1002
Author: Bernd Eckenfels
Date: Fri, 26 Sep 1997 00:46
21 lines
2166 bytes
In de.comp.lang.java Richard Kennaway <jrk@sys.uea.ac.uk> wrote:
> I've tried this in Netscape, and percentage width and height parameters
> in an <applet> tag appear to be ignored.  Absolute values work (although
> I've had problems in getting the applet to realise that it's not running
> in the default size of rectangle).

Percent Tags work as initial size if the applet tag is in a frame (at least
with the 1.1 patch). With ie4.0 even resizing works very well, just give
100% and your applet is resized dynamically every time the browser is
resied. With netscape the applet wont resize, but you get stop/start on
browser resizes (filed as a known bug). I tried to read the browser-area
size from Applet.getParent(), but there is no docu from netscape on
"netscape.applet.*" (nor com.ms.*).

Greetings
Bernd
-- 
  (OO)      -- Bernd_Eckenfels@Wittumstrasse13.76646Bruchsal.de --
 ( .. )  ecki@{inka.de,linux.de,debian.org} http://home.pages.de/~eckes/
  o--o     *plush*  2048/93600EFD  eckes@irc  +4972573817  BE5-RIPE
(O____O)   You can check-out any time u like, but u can never leave
Thread Navigation

This is a paginated view of messages in the thread with full content displayed inline.

Messages are displayed in chronological order, with the original post highlighted in green.

Use pagination controls to navigate through all messages in large threads.

Back to All Threads