LeighExchange - Free Advertising Network Stock Research at Internet Speed Need Money Easy and Quick?
On second thoughts, this might not be so bad if I knew what I was doing.
Would it be fair to say that I could embed an Applet tag within a or an and then have complete flexibility in positioning, size, style of whatever the applet paints "within" the browser? I'm guessing attributes such as height and width can be manipulated with DOM like any other; is that right? This is beginning to sound pretty sexy! I don't know enough about graphics and how paint() works, and I'm struggling to disassociate the Applet code from its html tag presence; Does anyone have a small example of this in progress? (Yes, I will do more RTFMing :-) What if two tags call the same applet; does init() get called twice? Two instances of the applet of just one? two pannels,frames,canvasses and just one applet? What if there are three Applets active in the frameset; How can they invoke each others methods without having been aware of each other at compile-time? Given the (at least by default) single-threading of browser-applet interaction, can I share the one socket connection between the three? Is there global memory/references? I've got a JavaScript DOM (getElementById) identifier that lets JS lnow when I'm calling a given applet's methods but surely this handle/object-instance would be of little use in telling applet[2] about the existance of applet[1] (and its methods)? I think this is getting into that dynamic activation stuff that you told me about (and I didn't understand :-) the first time - Sorry. An example would really, really help here though. Let's start small - "An example of an Applet painting and Image in a browser" any takers? websites? Cheers Richard Maher "Richard Maher" wrote in message news:eu1qmg$1mk$1@news-01.bur.connect.com.au... > Hi Arne, > > Thanks for the reply. > > "Arne Vajhøj" wrote in message > news:460323df$0$90268$14726298@news.sunsite.dk... > > Or you can use an applet that retrieves the images via socket > > and displays it within the applet. > > This is very important to me. Are you really saying "can" or "as far as I > know you used to be able to"? Are you referring to Microsoft's > implementation of Data Source Objects in Internet Explorer or something > else? The reason that I am so sceptical is that I asked the following > question xposted here and c.l.javascript a while back: - > > ----- Original Message ----- > From: "Richard Maher" > Newsgroups: comp.lang.java.programmer,comp.lang.javascript > Sent: Saturday, March 10, 2007 9:24 AM > Subject: Applet as DSO in Browser example? MSIE only? > > > Hi, > > > > Recently on the web I came across documentation discussing Data Source > > Objects (DSO) in relation to browser and html functionality (in particular > > the ability to declare a Java applet as a data source that can be used > with > > any or the HTML tags that take the src="" attribute). I find it > interesting > > and potentially *very* useful and would like to know more, so if anyone > can > > answer any of the following questions that would be great: - > > > > 1) Do you have an example of an Applet functioning as an applet to > something > > like a that I can see? > > > > 2) Is this a MicrosoftIE-only feature? I can't find it in other html tag > > reference sites. (I'm using w3schools as a sort of yardstick; is that less > > than optimal?) What do other browsers do? Is Microsoft deprecating this > > along with other Java stuff? > > > > 3) I've searched in c.l.j.p/c.l.javascript and the only references to DSOs > > appear to be server based (or data sources other than Applet) I'm guessing > > they're entirely different beasts; is that correct? > > > > 4) Anyone ever passed a BufferedImage over to Javascript for display on a > > web page? (I know it'd be single threaded and all those little .GIFs and > > .JPEGs are designed for parallel http webservers, but think of a blob in a > > database that has an employee photo of geological survey or something. . > .) > > > > Thanks for any help! > > > > Regards Richard Maher > > > > PS. I am already passing result set s back to a list > quite > > happily; it's the tighter integration between the html tags and my socket > > that I'm striving for here. > > > > One of the places I've been looking: - > > > http://msdn.microsoft.com/library/default.asp?url=/workshop/author/databind/datasources.asp > > > > . . .and the only answer I got was: - > [ > The reference to Java applet on > MSDN is a bit mysterious to me. I guess for IE 4/5 Microsoft allowed > to use their JVM for bridging to the needed ActiveX, so people could > use either or depending on personal preferences. In > either case it is definitely in relation to the Microsoft own JVM > which is not provided any more. It has nothing to do with Sun plugin. > ] > > It would be great if you could still do this! Do you (or anyone) have an > example? > > Hold on, I've just re-read what your post actually says and not what I > wanted it to say "displays it within the applet." :-( I assume that means > as opposed to displaying it within the browser? > > Cheers Richard Maher > > "Arne Vajhøj" wrote in message > news:460323df$0$90268$14726298@news.sunsite.dk... > > Richard Maher wrote: > > > But before launching into Swing there is one niggle or possible > > > spanner-in-the-works I'd like to quiz you about, and that is "footprint" > > > both in terms of memory and bandwidth of a Swing evoking class. In my > case > > > I'm using an Applet that does little more user interaction than pop-up a > > > couple of dialog boxes before handing control over to the web browser > and > > > html, and find AWT to be a stream-lined gazelle-like creature (albeit > > > three-legged) and fear Swing could be more like an elephant. Are my > fears > > > ill-founded? Are all the class libraries in the JVM anyway so don't have > to > > > be sent over the network? Will my Class and JAR files be roughly the > same > > > size? Is relative resource consumption (or body mass index) an issue? > > > > The Swing classes has been part of Java since version 1.2. > > > > Your code may actually shrink a little bit in size because > > you may replace some of your code with builtin Swing functionality. > > > > Swing apps do tend to use some memory. But would not consider it > > a problem on any PC that is not completely outdated. > > > > > PPS. If I was holding a series of say employee photographs/images as > blobs > > > in a database, can anyone tell me how I would get one of them up into a > > > web-browser without first having to export it to a .jpeg/.bmp/.gif > file? I > > > must have missed something? I know http servers/browsers are optimized > to > > > have seperate threads for uploading images but nonetheless, what's the > > > alternative? Can I pass an BufferedImage back from an applet to > Javascript? > > > (And then what would it do with it without a SRC="#something"?) > > > > You can do a IMG tag with SRC pointing to a server side script that > > sends the image from the database to the browser with the correct > > content type. > > > > Or you can use an applet that retrieves the images via socket > > and displays it within the applet. > > > > Arne > > > >
I don't know enough about graphics and how paint() works, and I'm struggling to disassociate the Applet code from its html tag presence; Does anyone have a small example of this in progress? (Yes, I will do more RTFMing :-)
What if two tags call the same applet; does init() get called twice? Two instances of the applet of just one? two pannels,frames,canvasses and just one applet?
What if there are three Applets active in the frameset; How can they invoke each others methods without having been aware of each other at compile-time? Given the (at least by default) single-threading of browser-applet interaction, can I share the one socket connection between the three? Is there global memory/references?
I've got a JavaScript DOM (getElementById) identifier that lets JS lnow when I'm calling a given applet's methods but surely this handle/object-instance would be of little use in telling applet[2] about the existance of applet[1] (and its methods)?
I think this is getting into that dynamic activation stuff that you told me about (and I didn't understand :-) the first time - Sorry. An example would really, really help here though.
Let's start small - "An example of an Applet painting and Image in a browser" any takers? websites?
Cheers Richard Maher
"Richard Maher" wrote in message news:eu1qmg$1mk$1@news-01.bur.connect.com.au... > Hi Arne, > > Thanks for the reply. > > "Arne Vajhøj" wrote in message > news:460323df$0$90268$14726298@news.sunsite.dk... > > Or you can use an applet that retrieves the images via socket > > and displays it within the applet. > > This is very important to me. Are you really saying "can" or "as far as I > know you used to be able to"? Are you referring to Microsoft's > implementation of Data Source Objects in Internet Explorer or something > else? The reason that I am so sceptical is that I asked the following > question xposted here and c.l.javascript a while back: - > > ----- Original Message ----- > From: "Richard Maher" > Newsgroups: comp.lang.java.programmer,comp.lang.javascript > Sent: Saturday, March 10, 2007 9:24 AM > Subject: Applet as DSO in Browser example? MSIE only? > > > Hi, > > > > Recently on the web I came across documentation discussing Data Source > > Objects (DSO) in relation to browser and html functionality (in particular > > the ability to declare a Java applet as a data source that can be used > with > > any or the HTML tags that take the src="" attribute). I find it > interesting > > and potentially *very* useful and would like to know more, so if anyone > can > > answer any of the following questions that would be great: - > > > > 1) Do you have an example of an Applet functioning as an applet to > something > > like a that I can see? > > > > 2) Is this a MicrosoftIE-only feature? I can't find it in other html tag > > reference sites. (I'm using w3schools as a sort of yardstick; is that less > > than optimal?) What do other browsers do? Is Microsoft deprecating this > > along with other Java stuff? > > > > 3) I've searched in c.l.j.p/c.l.javascript and the only references to DSOs > > appear to be server based (or data sources other than Applet) I'm guessing > > they're entirely different beasts; is that correct? > > > > 4) Anyone ever passed a BufferedImage over to Javascript for display on a > > web page? (I know it'd be single threaded and all those little .GIFs and > > .JPEGs are designed for parallel http webservers, but think of a blob in a > > database that has an employee photo of geological survey or something. . > .) > > > > Thanks for any help! > > > > Regards Richard Maher > > > > PS. I am already passing result set s back to a list > quite > > happily; it's the tighter integration between the html tags and my socket > > that I'm striving for here. > > > > One of the places I've been looking: - > > > http://msdn.microsoft.com/library/default.asp?url=/workshop/author/databind/datasources.asp > > > > . . .and the only answer I got was: - > [ > The reference to Java applet on > MSDN is a bit mysterious to me. I guess for IE 4/5 Microsoft allowed > to use their JVM for bridging to the needed ActiveX, so people could > use either or depending on personal preferences. In > either case it is definitely in relation to the Microsoft own JVM > which is not provided any more. It has nothing to do with Sun plugin. > ] > > It would be great if you could still do this! Do you (or anyone) have an > example? > > Hold on, I've just re-read what your post actually says and not what I > wanted it to say "displays it within the applet." :-( I assume that means > as opposed to displaying it within the browser? > > Cheers Richard Maher > > "Arne Vajhøj" wrote in message > news:460323df$0$90268$14726298@news.sunsite.dk... > > Richard Maher wrote: > > > But before launching into Swing there is one niggle or possible > > > spanner-in-the-works I'd like to quiz you about, and that is "footprint" > > > both in terms of memory and bandwidth of a Swing evoking class. In my > case > > > I'm using an Applet that does little more user interaction than pop-up a > > > couple of dialog boxes before handing control over to the web browser > and > > > html, and find AWT to be a stream-lined gazelle-like creature (albeit > > > three-legged) and fear Swing could be more like an elephant. Are my > fears > > > ill-founded? Are all the class libraries in the JVM anyway so don't have > to > > > be sent over the network? Will my Class and JAR files be roughly the > same > > > size? Is relative resource consumption (or body mass index) an issue? > > > > The Swing classes has been part of Java since version 1.2. > > > > Your code may actually shrink a little bit in size because > > you may replace some of your code with builtin Swing functionality. > > > > Swing apps do tend to use some memory. But would not consider it > > a problem on any PC that is not completely outdated. > > > > > PPS. If I was holding a series of say employee photographs/images as > blobs > > > in a database, can anyone tell me how I would get one of them up into a > > > web-browser without first having to export it to a .jpeg/.bmp/.gif > file? I > > > must have missed something? I know http servers/browsers are optimized > to > > > have seperate threads for uploading images but nonetheless, what's the > > > alternative? Can I pass an BufferedImage back from an applet to > Javascript? > > > (And then what would it do with it without a SRC="#something"?) > > > > You can do a IMG tag with SRC pointing to a server side script that > > sends the image from the database to the browser with the correct > > content type. > > > > Or you can use an applet that retrieves the images via socket > > and displays it within the applet. > > > > Arne > > > >