Skip to main content

Dragable applets -- you screwed that up too...

54 replies [Last post]
demonduck
Offline
Joined: 2008-03-14
Points: 0

First, before I start my rant, the place holder image (splash screen) you use to show
where the applet was dragged from is absolutely gorgeous. Why don't you use that as
the Java splash screen instead of the orange gargoyle you threaten people with now?

I bet the person who approved that drives a Ford Taurus and wears fish ties.

But the dragable applet -- why did you even bother to waste time on that feature when
there are so many other pressing issues? I mean MP3 support would be nice. So
would faster startup times and Firefox 2 support or 64bit
support. But no, you have to spend the
man hours on dragging an applet out of a dragable window. Mysterious engineering!!!

And you didn't even do it right. Drag an applet out of the page; go to another URL; come
back to the applet page and get another copy of the same applet that is still running
on the desktop. How is an applet programmer supposed to program around that?

You never even follow your own guidelines for the use of init(); start(); stop(); destroy()
and now you add another complicated feature with no way for the applet programmer
to detect the use of and program for.

Amateurs!!!

Reply viewing options

Select your preferred way to display the comments and click "Save settings" to activate your changes.
cvd
Offline
Joined: 2009-03-18
Points: 0

> Until he learns to express his opinion in a non-aggressive and non-inflammatory tone, and
> actually listen to what people are trying to tell him, he'll continue to be ignored (at least, by me).

Dmitri,
Sure, you can ignore anybody and that’s your sacred right. Making a statement about it is something else and people can question your motivation. What you cannot ignore is the numerous questions that were asked in this thread and never found a reasonable answer. I don’t think readers will care too much about somebody’s particular tone or ego size. But certainly, they can draw their own conclusions even based on the lack of answers or interest.
In my mind, the best thing to ignore in similar situations is our feelings. If nothing else that helps us become better professionals.

trembovetski
Offline
Joined: 2003-12-31
Points: 0

You don't see answers from me in this thread because I don't see any questions that are within my area of expertise.

If you want to see my and my colleagues' answers to this user regarding Java2D and other areas I know something, feel free to browse the java2d mailing list. May be you will think differently after going through those.

Dmitri

linuxhippy
Offline
Joined: 2004-01-07
Points: 0

> What? You want me to tell you what you should
> think?
I am bored. You "win" and you're right. Congrats.

trembovetski
Offline
Joined: 2003-12-31
Points: 0

> Demonduck obviously cares passionately about the Java platform and is making suggestions to improve the platform albeit in a rather agressive tone..

Until he learns to express his opinion in a non-aggressive and non-inflammatory tone, and actually listen to what people are trying to tell him, he'll continue to be ignored (at least, by me).

Dmitri

demonduck
Offline
Joined: 2008-03-14
Points: 0

> > Demonduck obviously cares passionately about the
> Java platform and is making suggestions to improve
> the platform albeit in a rather agressive tone..
>
> Until he learns to express his opinion in a
> non-aggressive and non-inflammatory tone, and
> actually listen to what people are trying to tell
> him, he'll continue to be ignored (at least, by me).
>
>
> Dmitri

A fine example of the unmitigated arrogance of these people. I'm to learn speak to appease this guy. If his ego containment system ever fails, there will be devastation for miles around.

But it's ok that he ignores me, he's had nothing useful to say for the last 3 years.

Dmitri -- I just don't care...

turks
Offline
Joined: 2007-12-23
Points: 0

Demonduck is pompous ASS ! Arrogant and condescending !

Demomduck, get some balance in your life, you need it.

-Turks

linuxhippy
Offline
Joined: 2004-01-07
Points: 0

> Demonduck obviously cares passionately about the Java
> platform and is making suggestions to improve the
> platform albeit in a rather agressive tone.

The problem I see is that there are a lot of people arround with their great ideas, however many think his/her idea is *the* thing which would java make ultimativly rock and start to spread poison if others tell them they think different. Of course thats there POV, but insulting others (e.g. SUN) because they don't share this opinion is something I don't like ... from my POV ;)

After all the big question is who should implement that stuff, and who should pay that? So I don't think the lack of opinions and ideas is the problem, but people missing how implement it.
Should Sun pay Demonduck (as he suggested) so that he can implement the features he would like to see in java, in order to make more money with java development?
I don't think so, however thats just my opinion - if demonduck thinks its a great idea, well ...

> Linuxhippy said
> "take, take, take and complain, but no give" - this
> demonstrates a fundamental misunderstanding of the
> relationship between us users of the JDK and you Sun
> developers,
I am *NOT* a sun developer. I have won the JDK Innovator's Challenge and I am working on the XRender Java2D pipeline for JDK7 as a spare time project, but I am not any more affiliated with Sun than you are.
Sorry if this gave you a wrong picture of Sun's engineers.

- Clemens

fatbatman
Offline
Joined: 2004-12-24
Points: 0

> I am *NOT* a sun developer. I have won the JDK Innovator's Challenge and I am
> working on the XRender Java2D pipeline for JDK7 as a spare time project, but I am
> not any more affiliated with Sun than you are.
> Sorry if this gave you a wrong picture of Sun's engineers.

I assumed... :), apologies, and to Sun employees for what I'd written related to this.

>> people who really are
>> the only reason these clowns have jobs -- they tell
>> them to stuff it.
>Yes, sure. They have Jobs they pay with the money ... they did not get from you?
>They have paid jobs because you download java for free? Am I the only one not >understanding you logic?

>> So I should be gentle with people who do monumentally
>> dumb things like ignore MP3,
>Do you pay the license costs related with this?

This line of thinking is what caused me to get involved in this thread. Just because we don't pay fee to use the JDK it doesn't mean our view should be ignored.
Image if Google or TV stations took the same attitude, both provide a service which is "free" to the actual end users but they make money indirectly as a result of having those users.

Without people like us developing applications for Java what would be the point of it? As developers that make our living from Java it's us to up to tell Sun what we want from Java and when we feel we're being ignored we have no option but to shout louder. I don't agree with being rude, but I can see it's born out of frustration.

Often the hardest things to hear are actually the most helpful.

If people want to ignore Demonduck's comments because of his tone, I can understand, but his feedback is some of the most valuable on this forum so ignoring him is only hurting Java and indirectly yourself. It's the people that stay silent even if they're not happy that contribute nothing, not those that have made over 300 posts.

Regarding the drag drop there are times when true innovators can tell the users what they want, even if the users don't yet know it, Apple has done this time and again, Facebook are trying to with their gui redesigns.
While Sun is a highly innovative company when it comes to technology, but they don't have a successful track record for innovation of end user products/features. If they recognize this and listen more for suggest I think it would help Java and as result Sun.

The fact of the matter is that Java has lost desktop market share over the last 10 years because of not properly focusing it's energy on the features that will be useful to the largest number of users, and I agree with Demonduck that putting draggable applets before providing media/webcam support is a perfect example of that trend continuing.

linuxhippy
Offline
Joined: 2004-01-07
Points: 0

> The fact of the matter is that Java has lost desktop
> market share over the last 10 years because of not
> properly focusing it's energy on the features that...

10 years ago we had:
Java 1.2 in production, 1.3.0 was before release for windows only and everywhere were those java-1.1 "compatible" Microsoft's JVM / Netscape-4.7. Maybe 10-20% of desktop users had Sun's java installed, the rest were those broken 1.1 JVMs deploys along with browsers.
There was almost no end-user software written in java, except applets.

1.2.2 was slow and unstable, barely useable on the weak hardware of that time. 1.3.0 added hotspot which speeded up pure java-code, but still there weren't many improvements to Swing performance or desktop in general.

Today we have about 75% of internet users with Java-1.5+ (almost everybody has 1.6 installed), and people use Java software without noticing they are not running a native application.

So in my opinion it never has been as good as these days. We have a JRE now installed on almost every desktop compuetr, and lots of people using software written in Java.
Ok, applets lost a lot of market share, granted. But to be honest often they were simply misued (as flash is today), and especially with the horrible state of java-1.2/1.3 and partly 1.4 people quickly turned away.

Now JavaFX, in Austria we say "what the farmer doesn't know, he doesn't eat". I guess Demonduck never had an in-depth look at JavaFX, he is just angry because JavaFX got more priority than his ideas.
After all, sometimes cuts have to be made. Java wouldn't exist without such cuts.

> This line of thinking is what caused me to get
> involved in this thread. Just because we don't pay
> fee to use the JDK it doesn't mean our view should be
> ignored.
It isn't ignored, but nobody can expect that ideas are realized as soon as spoken out.

> As developers
> that make our living from Java it's us to up to tell
> Sun what we want from Java and when we feel we're
> being ignored we have no option but to shout louder.
> I don't agree with being rude, but I can see it's
> born out of frustration.
I too earn my money with writing java applications, and Sun itself does too.
So everybody has a different point of view, a different opinion.
I can live with that, if some others can't who cares ;)

- Clemens

demonduck
Offline
Joined: 2008-03-14
Points: 0

> > The fact of the matter is that Java has lost
> desktop
> > market share over the last 10 years because of not
> > properly focusing it's energy on the features

>
> Today we have about 75% of internet users with
> Java-1.5+ (almost everybody has 1.6 installed), and
> people use Java software without noticing they are
> not running a native application.
>
> So in my opinion it never has been as good as these
> days. We have a JRE now installed on almost every
> desktop compuetr, and lots of people using software
> written in Java.
> Ok, applets lost a lot of market share, granted. But
> to be honest often they were simply misued (as flash
> is today), and especially with the horrible state of
> java-1.2/1.3 and partly 1.4 people quickly turned
> away.
>
> Now JavaFX, in Austria we say "what the farmer
> doesn't know, he doesn't eat". I guess Demonduck
> never had an in-depth look at JavaFX, he is just
> angry because JavaFX got more priority than his
> ideas.

Here's a link to Adobe's view of how many people have what installed.
http://www.adobe.com/products/player_census/flashplayer/

I suppose one could say that 81% is "almost everybody" The problem is not everybody has 1.6.0.10 or greater installed. Many people are still running versions less than 1.6. The idea that " (almost everybody has 1.6 installed), " is pure fantasy.

I am focused on how people web publish panoramic images. Almost universally, Flash is the preferred platform for web publishing. Java is avoided because of the difficulty in supporting all the different versions and installation problems. And this isn't because of Java 1.4 or Java 1.3 or Java 1.2 -- this is now -- today.

Now if [b]EVERYBODY[/b] actually did have the latest 1.6 release installed -- that would solve many problems. But they don't and insisting that that is true is just silly.

There is an ongoing thread in these forums that talks about how jqs.exe prevents installation. And many people simply turn off the Java update scheduler.

I compile my applet to 1.5 and still get complaints that it "won't run" because the JRE version is less than 1.5. And my applet uses dead simple AWT -- no Swing whatsoever.

And I am willing to be convinced that FX is really going to be the "killer app" that displaces Flash. Prove it to me. I'm ready to listen. Show me the example that actually works on my computer. And please -- no spinning gears. And tell me when YouTube is switching to FX and I'll go buy the books and focus all my energy on FX.

So show me the killer FX app and I will bow down to your superior wisdom -- in this area.

linuxhippy
Offline
Joined: 2004-01-07
Points: 0

> I suppose one could say that 81% is "almost
> everybody" The problem is not everybody has 1.6.0.10
> or greater installed. Many people are still running
> versions less than 1.6. The idea that " (almost
> everybody has 1.6 installed), " is pure fantasy.

This was based on recent articles, which collected data from average websites.
The majority had 1.6 installed (something like 80%), the rest had 1.5, 1.4 was already in the low single digit area (1-2% or so).

Also my main focus was not on insisting everybody has the latest java installed, but how the situation has improved over the recent years. However, no matter what I write, you change some words, throw in new arguments and offend me when you run out of them ... so yes you have won.
And I am really proud of your intention to make java better by writing messages to that forum ;)

> Almost universally, Flash is the preferred
> platform for web publishing.
> Java is avoided because
> of the difficulty in supporting all the different
> versions and installation problems. And this isn't
> because of Java 1.4 or Java 1.3 or Java 1.2 -- this
> is now -- today.
Ah and ... what? So you blame Sun, because some guys haven't updated their java environment?

I've developed a quite large (well at least for an applet) client/server applet for an european car manufacturer, and this works well on 1.1.4+ up to 6.0u10.
The applet is also used "in the wild", not only on prepared PCs and I didn't encouter horrible problems.

> Now if [b]EVERYBODY[/b] actually did have the latest
> 1.6 release installed -- that would solve many
> problems. But they don't and insisting that that is
> true is just silly.
>
> There is an ongoing thread in these forums that talks
> about how jqs.exe prevents installation. And many
> people simply turn off the Java update scheduler.
>
> I compile my applet to 1.5 and still get complaints
> that it "won't run" because the JRE version is less
> than 1.5. And my applet uses dead simple AWT -- no
> Swing whatsoever.
Well, if you compile it to 1.5, it will run on 1.5 and up.
What has this to do with AWT or Swing.

> And I am willing to be convinced that FX is really
> going to be the "killer app" that displaces Flash.
> Prove it to me. I'm ready to listen. Show me the
> example that actually works on my computer. And
> please -- no spinning gears. And tell me when
> YouTube is switching to FX and I'll go buy the books
> and focus all my energy on FX.
>
> So show me the killer FX app and I will bow down to
> your superior wisdom -- in this area.

Who talked about convincing you to use JavaFX, in your stage it can be counted as success to get you to accept that there's more than your universe and the bugs and problems you experience.

After all - good luck with your applet.

demonduck
Offline
Joined: 2008-03-14
Points: 0

Maybe IBM will put the Java house back in order when they buy SUN. IBM did a real good job the way they run Eclipse as open source THAT WORKS!

cowwoc
Offline
Joined: 2003-08-24
Points: 0

God forbid. As a person who has used to use an operating system owned by IBM let me tell you they are a total disaster. In my opinion, Sun is a far more user-oriented and open-source company than IBM will be. Just my 2 cents.

demonduck
Offline
Joined: 2008-03-14
Points: 0

http://news.cnet.com/8301-1001_3-10204524-92.html

Intel CEO says Sun was shopped around

I don't think it had anything to do with Cisco. I think IBM is trying to consolidate architectures. IBM has the strongest Java license in the industry. By picking up Sun--which is the creator of Java--they really consolidate their position not just in Linux, but also in Java.

demonduck
Offline
Joined: 2008-03-14
Points: 0

[i]After all, for me it seems like take, take, take and complain, but no give.
"Fix this, you screwed that, why don't you, implement this or that, you suck, Java will die if you don't ..." won't help at all.
If it annoys you, grab the stuff and get your hands dirty - or pay Sun to do it, everything else is just not worth talking about.[/i]

If you want me to to re-engineer and enhance what SUN pays it's engineering and development staff to do poorly -- in many, many peoples opinion -- my services are available for a modest but realistic rate.

I would need a high speed internet connection directly to the source repository and the appropriate hardware and software and current documentation and test suites to find, fix and integrate my changes.

Do you want to discuss my contract rates or do you want to continue to complain that nobody is willing to work for free on SUN's commercial product that I used to depend on to make a living until it got so non-functional that nobody will use it for clientside apps so now I'm unemployed because my specialty is applets which nearly everybody thinks are impractical?

Alternatively, you can take my suggestions for enhancements -- which many acknowledge to be useful -- and implement them your self. I'll work with you since I don't have the resources to do the "dirty work" myself. My consulting rates for non-programming issues are also modest.

How about it? Want to work together or complain about my complaints?

We can start by re-enabling the original applet lifecycle so that init(), start(), stop() and destroy() are called when and as they were originally specified.

Then we can remove the draggable applet stuff and make the JVM allocate memory dynamically as needed with no need for the java_argument param.

Then we can clean up the Java2D API so that the average programmer has more flexibility rendering images with out nearly every programming avenue leading through BufferedImages. At the same time, we can incorporate support for other image and video formats into the standard JRE.

Oh, and let's not forget MP3 -- that seems to be a popular audio format.

Then we can rip out all that FX stuff from the JVM and other non-essential "improments" like generics so that the JVM shrinks instead of bloats.

Then we can work on enhancing AWT so that it really uses the native windowing system for each OS the JVM is ported to so that Swing -- which I've said sucks for many years -- can be quietly retired.

And once we get the JVM lean and mean, we can figure out how to make downloading incremental updates a workable system.

What do you think? Want to work together? Probably not. I'm guessing you will just insult me again and tell me that even though you think I should put my shoulder to the wheel, I don't know what I'm talking about.

linuxhippy
Offline
Joined: 2004-01-07
Points: 0

> If you want me to to re-engineer and enhance what SUN
> pays it's engineering and development staff to do
> poorly -- in many, many peoples opinion -- my services
> are available for a modest but realistic rate.

Wow, even more rude. You do take, take, take, complain and even want to get paid for.

Sorry but what do you expect? That Sun pays you for the bugs you would like to be fixed?!
After all, you get Java for free, and you make your living with it - isn't that enough to fix that simple small Swing bug that troubles you soo much that you flood all the forums telling everybody how Sun screwed it up again?

> Alternatively, you can take my suggestions for enhancements -- which many acknowledge to be useful -- and
> implement them your self. I'll work with you since I don't have the resources to do the "dirty work" myself. My
> consulting rates for non-programming issues are also modest.
Öhm, whats about this. I should fix the bugs that annoy you? Sorry, but I am not Santa Clause :P

The ideas are half-thought stuff without any historic knowledge why it was done this and that way.
If you would have programmed *real* apps with AWT, you would know how fine swing's lightweight approach is for example.
MP3 ... do you pay the licensing fees per downloaded JRE instance yourself? Ripping generics, do you really thing the JVM will be smaller - or would you just sacrifice compatibility? re-enable the old lifecycle which was replaced because it was that broken? Extend AWT? There is a reason why AWT on Unix uses Swing internally.....

- Clemens

demonduck
Offline
Joined: 2008-03-14
Points: 0

[i]Wow, even more rude. You do take, take, take, complain and even want to get paid for.[/i]

You think it's rude to be paid to do work on SUN's commercial product? Wow! What
kind of adolescent fantasy world do you live in?

[i]Sorry but what do you expect? That Sun pays you for the bugs you would like to be fixed?!
After all, you get Java for free, and you make your living with it - isn't that enough to fix that simple small Swing bug that troubles you soo much that you flood all the forums telling everybody how Sun screwed it up again?[/i]

[b]MADE[/b] a living at until Java got so bloated, slow and unreliable that nobody will use it on the desktop anymore.

And you don't even get your insults right. I never mentioned a "simple small Swing bug" ever in any post to any forum. You are a waste of bandwidth....

cowwoc
Offline
Joined: 2003-08-24
Points: 0

Come on man... enough.

You can complain about Java's faults but please be more professional about it. Sun's employees have remained quite polite throughout this entire conversation, so why are you blowing your top?

The fact of the matter is that Java is open-source and free. I agree that this does not excuse poor software quality but in this particular case I think that Sun does not fit into that category. They went out of their way to provide service that is far above what other vendors provide for free. IBM is a case in point, and there are many others.

My suggestion is that you either pay Sun for commercial support or move on to another product. Insulting the very people that are trying to help you will not get things moving in the right direction.

demonduck
Offline
Joined: 2008-03-14
Points: 0

So you want me to be a professional insulter? That's funny....

And that guy aint helping anybody -- not you -- not me -- not anybody...

I have said many, many times that I think the JDK should have a modest subscription fee to use and develop with. That SUN has decided not to do that has done more to limit it's development than any criticism I could make. And what good is it to provide a "service" that nobody will use?

Yes, it is enough -- it's a real waste of time to try and talk to anybody at SUN -- or in these forums.

linuxhippy
Offline
Joined: 2004-01-07
Points: 0

> Yes, it is enough -- it's a real waste of time to try
> and talk to anybody at SUN -- or in these forums.
So why don't you simply leave?

demonduck
Offline
Joined: 2008-03-14
Points: 0

...it just got worse.

http://news.cnet.com/8301-1001_3-10161780-92.html?tag=newsLatestHeadline...

Sun Microsystems plans to launch JavaFX Mobile on Thursday, the second of a three-stage debut of technology it hopes will ease software design while modernizing its Java technology

In the mobile area, Apple's iPhone doesn't support Java at all. Adobe is working on a version of Flash 10 for mobile phones. And Google's Android operating system uses a version of Java that strays from the official industry fold, called the Java Community Process. Nokia's got its Symbian operating system, too, and Palm is trying again with its own.

Java has had a decade to get established on mobile phones, and despite problems such as the fragmentation that means a given Java program won't necessarily run on a given Java handset, it's widely available.

Way to go SUN! The train's already 30 minutes late and you parked your car on the tracks to get a good look...

cowwoc
Offline
Joined: 2003-08-24
Points: 0

I personal fear goes by the name of Qt. The fact that people are jumping ship from Swing to Qt which is available as a cross-platform GUI framework outside of Java should worry Sun. I would love to see Sun work on the next-gen version of Swing.

linuxhippy
Offline
Joined: 2004-01-07
Points: 0

> I personal fear goes by the name of Qt. The fact that
> people are jumping ship from Swing to Qt which is ...
Do you have any evicence that this is happening, except your subjective feeling? Why do you think QT is better than Swing?

After all, I know *lots* of developers not willed to take the C++ route again, and the Java devs I know are not willed to introduce a native dependency (JAMBI) just for something they already have.

> I would love to see Sun work ...
This is not geared towards you, but all the other non constructive stuff posted before your post.

I would like to see java developers work more on Java instead of complaining all the time or spreading a bad community atmosphere.
When I browse through the forums it almost seems like MS hired guys to generate doubts about java in the community.
The funny thing is that just a few guys spread _almost all_ that sh*t.

After all, for me it seems like take, take, take and complain, but no give.
"Fix this, you screwed that, why don't you, implement this or that, you suck, [b]Java will die if you don't[/b] ..." won't help at all.
If it annoys you, grab the stuff and get your hands dirty - or pay Sun to do it, everything else is just not worth talking about.

> on the next-gen version of Swing
Depends on what you mean with "next-gen".
Swing will get many improvements in JDK7, so more or less a new swing version.
However if you mean an incompatible break, that won't happen - after all why should it?

- Clemens

cowwoc
Offline
Joined: 2003-08-24
Points: 0

> Do you have any evicence that this is happening,
> except your subjective feeling? Why do you think QT
> is better than Swing?

QT has a lot of visible momentum behind it that Swing does not. I have no doubt in my mind that new widgets will be added in the near future and existing bugs will be fixed very quickly. Sun seems to have treated Swing like a deprecated API over the past couple of years. I don't need to rehash specific bug reports. As we've discussed in previous threads there are hundreds of open bugs, many of them over five years old, which Sun has yet to address.

I like the basic Swing components but as soon as you touch anything related to Document or JTree models it becomes a big freaking mess.

1) If you want to build your own component by extending the Swing ones there is a serious lack of documentation telling you how to do it right. Personally I don't think you should fix this. I believe it is a byproduct of #2.
2) Swing is "extend-oriented" instead of providing common use-cases out-of-the-box.

To make matters worse, Swing classes haven't been very well designed for extensions.There are plenty of places where you expect to be able to override a method to see a behavior work but it's not enough. You end up having to extend multiple methods (this isn't documented of course) and there are a whole slew of ugly side-effects between the methods. There are other cases I've seen where for example JTree expects a TreeModel but realistically speaking if you use anything except a DefaultTreeModel then nothing really works. There is too much "magic" under the hood of DefaultTreeModel which really belongs in TreeModel's specification.

In short: Swing should contain less components that are meant to be extended and more components that are use-case oriented (work as-is out of the box). The components meant for extension should be *very* well designed. Take your time on this one and *please* make sure you get it right. I would like this to be done outside the context of the core APIs so we can put out "unstable" APIs for and tell the community they will only be frozen if they aren't modified for 3 years or so (when we're relatively confident we got it right).

The fact that Swing doesn't contain use-case-oriented components wastes a lot of productivity. You need only search the web to find 10 different versions of the same common widgets and they're all poorly done. We need at most one version of each component but it needs to be very well designed and implemented.

> After all, I know *lots* of developers not willed to
> take the C++ route again, and the Java devs I know
> are not willed to introduce a native dependency
> (JAMBI) just for something they already have.

C++ is not the only player in town. I'm talking about developers moving to C# with Qt. I didn't take C# very seriously until recently but I see plenty of client-side developers choosing this combination. It helps them with respect to portability.

> I would like to see java developers work more on Java
> instead of complaining all the time or spreading a
> bad community
> After all, for me it seems like take, take, take and
> complain, but no give.
> "Fix this, you screwed that, why don't you, implement
> this or that, you suck, ..." won't help at all.

I'm trying to do my part. I maintain https://sourceforge.net/projects/jace/ in my free time.

> This is not geared towards you, but all the other non
> constructive stuff posted before your post.

Agreed. A lot of non-constructive stuff has been posted.

> Depends on what you mean with "next-gen".
> Swing will get many improvements in JDK7, so more or
> less a new swing version.

Care to elaborate?

> However if you mean an incompatible break, that won't
> happen - after all why should it?

I don't mind you deprecating the complex components and leaving them in, but I strongly suggest Sun replace them outright instead of continuing to extend them.

linuxhippy
Offline
Joined: 2004-01-07
Points: 0

> I have no doubt in my mind that new widgets
> will be added in the near future and existing bugs
> will be fixed very quickly.
New functionality was added to Swing with every release, however you're right most of it did not affect its API, which I also thing is a bit sad.
There are a few new widgets planned for JDK7, e.g. a Datepicker.
I have to admit that I prefer external Widgets, I don't like the JRE beeing bloated with all possible "this could be useful"-widgets. It also means not-frozen APIs.

> I don't need to rehash specific bug reports.
> As we've discussed in previous threads there are
> hundreds of open bugs, many of them over five years
> old, which Sun has yet to address.
QT also has MANY open bugs, although I have to admit that Swing probably has more ;)
I guess what Swing could really bring foreward are contributions to OpenJDK.
If you stumble over one thing which is not too hard to fix, why not do it yourself.

> The fact that Swing doesn't contain use-case-oriented
> components wastes a lot of productivity.
I guess this is what JavaFX is ment to become. And if you really need more powerful stuff you can still access Swing, or create your own components.
Most blame JavaFX because its new and they are not used to (in Austria there's a sentence which translates into "what the farmer doen't know he doesn't eat").
Its still very young, I'll give it some time (and wait until its opensourced) until I'll use it in production, I quite like the direction. Of course its not a 1:1 solution like most people expect it, but what if the resulting solution is even better?
Java also was not a 1:1 solution to solve problems of that time, but it is a success.

> I didn't take C#
> very seriously until recently but I see plenty of
> client-side developers choosing this combination. It
> helps them with respect to portability.
I just can talk about what I see here.
I see the "Visual Studio" guys migrate slowly from MFC to C#/Winforms, and the Java guys almost exclusivly using Swing, a small single-digit number is using SWT because they are concerned about their windows users.

And a few Gnome devs, using mono with GTK#, producing the same kind of apps they did before with C (how nonpolitical I can be if I try^^).
After all, have you tried Mono? Their VM is dog slow, and the class-library always has to catch up with .NET. Furthermore everything except the core-parts (the stuff included in the spec) could become subject to patent problems.
The statement of the mono devs was, that they would simple remove the affected stuff - I guess I am not the only one which doesn't like that type of certainty ;)

> I'm trying to do my part. I maintain
> https://sourceforge.net/projects/jace/ in my free
> time.
Cool :)

> > Depends on what you mean with "next-gen".
> > Swing will get many improvements in JDK7, so more or
> > less a new swing version.
>
> Care to elaborate?
As far as I know whats planned is resolution independence (don't know if thats still on the schedule), a few new widgets, fixes...

> I don't mind you deprecating the complex components
> and leaving them in, but I strongly suggest Sun
> replace them outright instead of continuing to extend
> them.
Isn't that what JavaFX does?

- Clemens

cowwoc
Offline
Joined: 2003-08-24
Points: 0

> I have to admit that I prefer external Widgets, I
> don't like the JRE beeing bloated with all possible
> "this could be useful"-widgets. It also means
> not-frozen APIs.

I want this too.

> > I don't mind you deprecating the complex
> components
> > and leaving them in, but I strongly suggest Sun
> > replace them outright instead of continuing to
> extend
> > them.
> Isn't that what JavaFX does?

Fair enough but it hasn't really been pitched to Java users. I'd like to see a blog post on java.net that focused exclusively on how to use the new widgets from Java without any JavaFX-specific discussion. All the articles I've seen so far were about selling JavaFX to developers. That's not the kind of article I'm looking for.

linuxhippy
Offline
Joined: 2004-01-07
Points: 0

> Fair enough but it hasn't really been pitched to Java
> users. I'd like to see a blog post on java.net that
> focused exclusively on how to use the new widgets
> from Java without any JavaFX-specific discussion. All
> the articles I've seen so far were about selling
> JavaFX to developers. That's not the kind of article
> I'm looking for.

I completly agree, I more practical documentation instead of all this "its sooo great" sort of articles.
I would like to get tutorials, see how I can use JavaFX productily for other things that fancy flash-style graphics and so on.

- Clemens

PS: Sorry, my discussion style is sometimes a bit rude. Hope I didn't offend you.

stolsvik
Offline
Joined: 2006-09-17
Points: 0

Demonduck states:
[i]Only have one lifecycle for applets. Make it the "old" lifecycle because it is more
flexible and you already support it and it subsumes the new lifecycle perfectly.
I still don't understand the reason why the new lifecycle was created. [/i]

I know this is an old thread, but I just have to state my opinion severely against this proposition by demonduck.

IMO, I seriously want those damn java instances to [b]DIE[/b] when I close a tab containing an applet. How obvious isn't that??? That annoyance where my PC basically crash because a, or several, stupid 43854 GB java instance lingers around, although I've killed all tabs that had java running - ALL of them - is so damn dumb that I cannot understand how anybody came up with the silly, SILLY idea in the first place. It has never worked. It seriously didn't work when PCs were much smaller and slower than today, and it still doesn't work since Java has become so extremely much fatter. I am a developer and "power user" myself, so I know what have happened, and can fix it by killing the instance and "manually" cleaning up. How is my parents, or pretty much any "normal user", supposed to handle this? What they understand, is that by going into a page with java, you have destroyed your computer until you reboot. Seriously.

Although much of what demonduck says is way true, this specific point I don't agree with at all.

PS: Note, I am a Java user, and Java enthusiast. I am also a JavaFX hater. I so wholeheartedly agree with anybody that voices concern about the logic within Sun's marketing and engineering departments that let such stuff happen, instead of polishing what is already out there. Pretty much nothing in java [i]really[/i] works! (Except server-side, granted - it really shines there) Why can't you fix that? How is JavaFX going to compete against Flash?? The mere idea is absurd: Java basically crashes my PC by simply starting it! And it definitely crashes my brain during the wait. We need [b]extreme[/b] focus on slimming the memory footprint, and on startuptime, and on embeddability (Why is flash so much better? However, with the new plugin, you're on the right track), JNLP and a serious multi-OS [i]application installer[/i] with serious [i]app updateability[/i], Swing, media, [b]Desktop Java in general[/b]. The list just goes on and on - and you start with some whacky JavaFX stuff [b]that no one in the whole universe wants??[/b] How is this even possible? I really am stunned by this: How is it possible to make such a grand mistake, and completely ignore the feedback of your user base? How is JavaFX going to succeed with the HUGE AMOUNT of problems that you have in your foundations that you just don't ever seem to be able to polish off?

My bank used a java applet for filling out a "Giro" (payment slip thingy) in the startup phase. After a year they removed it, since [b]all[/b] their customers [b]hated[/b] it, including me. It didn't work for half their customers. They needed lots of pages that explained how you worked around the billion different bugs the different setups had. It "crashed" their customers' machines after doing a single payment (the lingering java instances). They replaced it with a less fancy normal

, and everyone, including me, was very very happy. Folks: JAVA ON THE DESKTOP (and in the browser) JUST DON'T WORK, in hundreds of different small and big ways that makes it useless! And what do you do? You completely re-focus, and start up with some complete bs called JavaFX?? Wow.

Kind regards,
Endre.

Edited to take the edge of the rantest rants..

Message was edited by: stolsvik

demonduck
Offline
Joined: 2008-03-14
Points: 0

I yield the rant podium to stolsvik...

demonduck
Offline
Joined: 2008-03-14
Points: 0

RE: legacy_lifecycle param -- very good. Tested it in FF2. Works as expected in u11.
Thank you. Not something I would have thought to look for. Perhaps make this
information more easily found. I know a lot of people who expect legacy lifecycles
for their applets.

For those of you who are wondering --

I hope you pursue adding stop() / start() events for tabs and iconization since you
already work there...

Thanks for pointing me to the docs for draggable applet events. Hard to find otherwise.
Looks like you have my concerns answered.

[i]complete rewrite of the applet support which was necessary in order to get to a point where we can feasibly resolve the outstanding bugs. The previous implementation and architecture were unmaintainable.[/i]

I can understand that. Been there myself.

Thank you for being responsive to my rants...

cowwoc
Offline
Joined: 2003-08-24
Points: 0

kbr, trembovetski,

I will have to agree with mikeazzi. demonduck's comments might be poorly phrased but he brings up completely valid points.

1) There are tons of important bugs in existing technologies which Sun never gets around to fixing, claiming they are low-priority. Instead vast amount of resources are spent putting out new technologies that some of us don't even see a demand for.

I'm not saying that Sun should fix all Java bugs, but there are quite a few issues that need to be fixed (such as the applet lifecycle issues that were mentioned) and in my view they are higher priority than draggable applets. The latter is "cool" but hardly necessary. I would happily support Sun on JavaFX, JNLP, draggable applets if I felt these new technologies were meant to replace buggy components instead of fixing them incrementally. Unfortunately that is not the case.

Webstart was supposed to "fix" applets but itself is full of bugs and is itself an unfinished experiment. It could have been a great technology if Sun would have actually polished off all the corner cases, but they did not. Just like applets. I doubt JavaFX will be any different.

I would love nothing more than for Sun to listen to strong community feedback asking them to dedicate more time to bug fixes and less to new feature requests, if only for a single major release cycle. Take the lack of consensus on Java7 as a blessing and instead of stuffing it full of new features use the opportunity to:

1) My personal pet peeve: fix Generics. It is teetering on the edge of causing more problems than it solves. I pro-Generics, if they are fully implemented. Sun's decision to go half-way using raw types, introducing wildcards and leaving out reification led to numerous usability problems.
2) Fix Swing (JTree, JFileChooser and any component using a Document suffer from serious usability and development ease-of-use problems).
3) Polish Applets (fix the numerous 10-year-old bugs)
4) Polish JNLP (it is missing plenty of important features required by an application installer)

I would love to see Sun dedicate an entire major release version (Java7) to fixing *existing* issues instead of introducing completely new features. I think you guys did an amazing job in update 10. There is no good reason you couldn't continue to do the same for Java7. Just my 2 cents.

jsight
Offline
Joined: 2005-06-30
Points: 0

I'm not saying that Sun should fix all Java bugs, but there are quite a few issues that need to be fixed (such as the applet lifecycle issues that were mentioned) and in my view they are higher priority than draggable applets. The latter is "cool" but hardly necessary.

I completely agree. Its very disappointing to hear complaints about "not enough resources" to address usability issues at the same time as development progresses on draggable applets. Draggable applets are something that looks good to some people in a demo in front of a bunch of techies at a big tech show (like JavaOne?) but won't get used seriously anywhere else.

I'd rather a solid product without major frightening misfeatures (notification area icon) than stuff like that. I am glad that u10 at least works decently fast on modern hardware, though, and doesn't crash my browser nearly as often as before. :)

demonduck
Offline
Joined: 2008-03-14
Points: 0

As kbr pointed out. The "old" applet lifecycle is still available. Not clear as to
which versions of Java or browsers it is available on.

But two applet lifecycle models is not the best idea just because you don't know
for sure where the "old" lifecycle will be supported. So you really can't write a new
applet that would use the "old" lifecycle even though it is much more flexible and
responsive to changes in the browser.

And the "new" life cycle really doesn't need start() and stop() anymore because start()
is always called with init() and stop() is always called with destroy().

So this is muddled engineering.

Only have one lifecycle for applets. Make it the "old" lifecycle because it is more
flexible and you already support it and it subsumes the new lifecycle perfectly.
I still don't understand the reason why the new lifecycle was created.

It can't possibly be to conserve resources. This is especially true now that the
applet can specify it's own memory limits and even a separate JVM. So what
concern is the new lifecycle addressing?

This is a good example of the muddled engineering that is victimizing all of us.

And it's starting to blow back on SUN. 1.5 billion dollars lost last quarter and it
was announced today that 5 to 6 thousand people are going to get laid off.

Java Dev Team -- think harder about the engineering decisions you make.
You are running out of time.

cowwoc
Offline
Joined: 2003-08-24
Points: 0

> As kbr pointed out. The "old" applet lifecycle is
> still available. Not clear as to
> which versions of Java or browsers it is available
> on.

The new applet tag lets you specify what version you target. deployJava.js gives you even more flexibility.

> And the "new" life cycle really doesn't need start()
> and stop() anymore because start()
> is always called with init() and stop() is always
> called with destroy().

For now. Nothing prevents them from hooking tabs as you asked for in the future and breathing new life into start() and stop().

> I still don't understand the reason why the new
> lifecycle was created.

Let's wait for those in the know to explain this to us. I'm sure they had good reasons.

> Java Dev Team -- think harder about the engineering
> decisions you make.
> You are running out of time.

Give them more credit :) In my experience, this sort of thing has a lot more to do with the marketing department than it does with individual engineers. There will always be a conflict between marketing and engineering, such is life.

demonduck
Offline
Joined: 2008-03-14
Points: 0

> Give them more credit :) In my experience, this sort
> of thing has a lot more to do with the marketing
> department than it does with individual engineers.
> There will always be a conflict between marketing and
> engineering, such is life.

That is the most truest thing that has ever been said in this forum.

Marketing --- ARRRGGHHH!

cvd
Offline
Joined: 2009-03-18
Points: 0

Thanks, [b]kbr[/b]
Running inside a Java sandbox makes more sense. Your initial claim that dragged-out applets would “behaves like a standalone desktop application” was only raising extra questions.

Again, I wish we had a white paper that addresses the design decisions and goals. Lets hope once the feature is out of its “experimental” status a better documentation will be available.

> The dragged-out applet continues to run... just like applications run via Java Web Start.
So then, the user is tricked into installing a Java Web Start application without knowing or intending to do so.
Why would we need and alternative method of installing a JWS application?
Once again, we find more questions and fewer answers.

[b]demonduck[/b],
Here is (probably) the most detailed technical article I could find:
“The New Draggable Applet Feature in the Java SE 6 Update 10 Plug-In”
http://java.sun.com/developer/technicalArticles/javase/6u10_applets/
There are some important hook-ups that are mandatory for those who want to make a real use of this feature. Even "re-connection" is supported to a certain extent. Unfortunately, you might be disappointed by some strange decisions (e.g. JSObject not being supported in the dragged-out applet).

demonduck
Offline
Joined: 2008-03-14
Points: 0

I cannot think of one good reason why dragable applets exist or why SUN would waste manhours on it's creation when there are so many other problems that need addressing.

It takes my breath away...

fatbatman
Offline
Joined: 2004-12-24
Points: 0

I have to agree with demonduck.

fatbatman
Offline
Joined: 2004-12-24
Points: 0

...and after reading the thread again I'd like to come in on Demonduck's side and explain where I think he's coming from.

Although his tone is rather inflammatory I can understand and share is frustration.

Demonduck obviously cares passionately about the Java platform and is making suggestions to improve the platform albeit in a rather agressive tone. The tone of some Sun employees seems to imply that people using Java are getting something for free and so should either like it or lump it. Linuxhippy said "take, take, take and complain, but no give" - this demonstrates a fundamental misunderstanding of the relationship between us users of the JDK and you Sun developers, we need each other, without people building application for Java it will fail regardless of the hard work Sun employees do.
The reality is people like Demonduck and myself probably have far more invested in the success of Java than most Sun employees. Personally I've spent 6 years building a company that uses client side Java, so if it fails it effects me far more than most Sun employees.

That said, I commend the hard work from the Sun guys and the recent improvements, it's definitely moving in the right direction. I just think that the tasks could be prioritized better by listening to us users a bit more. We're all on the same team.

demonduck
Offline
Joined: 2008-03-14
Points: 0

Thank you fatbatman -- you understand because you also have a lot of blood, sweat and tears invested in Java.

I've got more than 10 years invested. Why? Because I believed what SUN said they were going to do. Write once run everywhere. I believed that. And for a while, they really tried to accomplish that mission.

Then they get into a pissing match with Microsoft, ignore Apple completely and generally flip off the entire desktop. And when people complain or suggest ways to make things better -- people who really are the only reason these clowns have jobs -- they tell them to stuff it.

So I should be gentle with people who do monumentally dumb things like ignore MP3, change the applet lifecycle for no apparent reason, continue insisting that the average user will be able to set memory limits, not support FF2 with the new plugin -- the list goes on indefinitely -- and always they have oh so good reasons and if you disagree -- stuff it.

Yes I'm pissed. And I hope IBM buys Java and fixes it.

linuxhippy
Offline
Joined: 2004-01-07
Points: 0

> Write once run everywhere.
There's a technical limitation here. Show me a platform as powerful as Java which is more WORA than Java is.

I've developed a lot of Java stuff, both client and server side, and beside the hard work needed to make stuff work back in MSJVM/Netscape days things have become really good with Java-1.4.

> Then they get into a pissing match with Microsoft,
> ignore Apple completely and generally flip off the
> entire desktop. And when people complain or suggest
> ways to make things better --
Apple said they develop it their own. After all it would suck up a lot of Sun's development team to maintain another platform -> less progress. You would be the first to complain.

The Microsoft stuff ... did you develop when MSJVM was the most widespread JVM installed? Those things were even present years after that dispute - man I am glad that Java is that much WORA now. After all, you seem to argue inconsistent - once you insult SUN of breaking java's WORA, on the other side you grumble because Sun did exactly that?

> people who really are
> the only reason these clowns have jobs -- they tell
> them to stuff it.
Yes, sure. They have Jobs they pay with the money ... they did not get from you?
They have paid jobs because you download java for free? Am I the only one not understanding you logic?

> So I should be gentle with people who do monumentally
> dumb things like ignore MP3,
Do you pay the license costs related with this?

> change the applet
> lifecycle for no apparent reason,
Because it was broken, and *users* were angry.

> continue insisting
> that the average user will be able to set memory
> limits,
Why? You now can do it yourself with plugin2/webstart.

> not support FF2 with the new plugin
FF2 is almost dead, just look at the webbrower statistics. It will be almost vanished (as 1.5 is now) very soon.
Sun has limited resources, and yes a cut has been made in order to allow a clean start.
Sure they could assign more staff to plugin development, but other areas would have to sacrifice that developers. Again, you would be first to complain.

-- the
> list goes on indefinitely -- and always they have oh
> so good reasons and if you disagree -- stuff it.
Yes, and I am sure you'll find many other things to shout about here.

> Yes I'm pissed.
You get what you give.

> And I hope IBM buys Java and fixes it.
I am not certain what I should think about that deal, if it will become reality.
I really hope it would/will help Java.

- Clemens

PS: I am *NOT* a sun developer.

demonduck
Offline
Joined: 2008-03-14
Points: 0

> > Write once run everywhere.
> There's a technical limitation here. Show me a
> platform as powerful as Java which is more WORA than
> Java is.
>

I think you mean WORE don't you? Maybe not. Maybe you mean something that only means something to you like your opinion that everybody else has a worthless POV but you.

But whatever WORA stands for I think that Flash is probably a pretty good example of how things might have been if SUN had simply done what it said it was going to do.

And you made my point that SUN's Java team wastes it's time on dumb stuff like FX and draggable applets while refusing to serve a significant platform like Apple. It wasn't Apple's choice to do their own Java. SUN just refused to develop an Apple version of Java. There was one in the beginning -- which I'm sure you remember -- you remember everything. I ran it on my MacII. Then they just stopped supporting Apple machines. More brilliance.

> > And I hope IBM buys Java and fixes it.
> I am not certain what I should think about that deal,
> if it will become reality.
> I really hope it would/will help Java.
>

What? You want me to tell you what you should think?

> - Clemens
>
> PS: I am *NOT* a sun developer.

kirillcool
Offline
Joined: 2004-11-17
Points: 0

> I think you mean WORE don't you? Maybe not. Maybe
> you mean something that only means something to you
> like your opinion that everybody else has a worthless
> POV but you.

http://en.wikipedia.org/wiki/Write_once,_run_anywhere

demonduck
Offline
Joined: 2008-03-14
Points: 0

> > I think you mean WORE don't you? Maybe not.
> Maybe
> you mean something that only means something to you
> like your opinion that everybody else has a
> worthless
> POV but you.
>
> http://en.wikipedia.org/wiki/Write_once,_run_anywhere

"or sometimes Write once, run everywhere (WORE), "

Which is the way I first heard it. Somebody changed that too....

cvd
Offline
Joined: 2009-03-18
Points: 0

I have few notes about the draggable applet functionality so let me try to stay on topic.

Is there any study of the demand for such a feature?
I’d prefer to see a white paper that covers, in deep details, all the reasons that justify the introduction of such a feature. Until I see it, I quite agree with [b]cowwoc[/b] that, this is "cool" but hardly necessary.

There’re many signs of upcoming troubles about the feature as pointed out correctly by [b]demonduck[/b].
As per [b]kbr[/b]:
> When you drag an applet out of the browser and close the web page it came from, that
> applet instance is conceptually disconnected from the browser. At that point it behaves
> like a standalone desktop application.

In other words, the user was tricked into installing something on their machine without knowing or intending to do so. No, I don’t think this will be impressive in long run.
I’m sure all of us know the big difference between applets and standalone applications. What about security? Yep, that’s where the differences are significant.
I’m only guessing, but probably that’s why [b]demonduck[/b] suggests that a draggable applet should never lose the connection to its hosting page.

Shortly, I agree that fixing known and outstanding issues is far more impressive to developers and users as opposed to introduction of fancy features that very few (if any) asked for.

kbr
Offline
Joined: 2003-06-16
Points: 0

> I’m sure all of us know the big difference between
> applets and standalone applications. What about
> security? Yep, that’s where the differences are
> significant.

The dragged-out applet continues to run within the secure Java sandbox, just like applications run via Java Web Start.

fatbatman
Offline
Joined: 2004-12-24
Points: 0

While not a game changer I think the concept of being able to install an applet is potentially useful, I just don't think the mechanism for doing this is very user friendly, most "basic" users hate drag and drop. It requires more effort. A simple utility method us developers could call on demand that would pop the applet out of the window, and another to ask if users would like to install the application would be a more user friendly system.

BTW - Has anyone tried to hack the mousehandling to do this from a button click?

kbr
Offline
Joined: 2003-06-16
Points: 0

The orange Java logo animation is, agreed, visually jarring. For various business reasons it hasn't been possible to revert it to something more subtle but I think at this point we can do it. I have filed RFE 6769840 (Replace orange "Java logo" animation) about this; when it shows up in the Sun Bug Database please vote for it if you feel strongly.

The behavior of the draggable applet feature is the only one that was both implementable in a reasonable time frame and, in my opinion, comprehensible to an applet developer. The behavior is similar to visiting the same web page in different tabs or browser windows. When you drag an applet out of the browser and close the web page it came from, that applet instance is conceptually disconnected from the browser. At that point it behaves like a standalone desktop application. We do not support "re-connection" of a disconnected applet instance to the browser. Applets may rely on both their own internal state as well as the state of the surrounding web page. WIthout too much reengineering of a given applet it is generally possible to make it work in a disconnected mode. Teaching an applet that it has been reconnected to a new instance of the web page where all of the page's state has been reset seems difficult.

If you use the new JNLP support in the Java Plug-In to deploy your applet then you can take advantage of desktop shortcuts, the JNLP PersistenceService, and even the JNLP SingleInstanceService. There are events that you can listen to in your applet upon various state changes: see http://java.sun.com/javase/6/webnotes/6u10/plugin2/index.html#EXPERIMENT... .

The dragged-out applet functionality is explicitly marked experimental in the release notes. If you have specific, constructive feedback on how it could be improved we would like to hear it.

Rich media support for the Java platform is being worked on in the context of the JavaFX initiative.

The new Java Plug-In in 6u10 is a complete rewrite of the software and the applet lifecycle management should now be robust, reliable, and most importantly, behave the same in all web browsers. If you find this to not be the case then please file a bug.

Regarding the Java Console menu option in the browser: maintaining that menu option at all is a non-trivial engineering task, and in the context of the new Java Plug-In the implementation becomes significantly more complex. We have too many other tasks on our plate at the moment to consider this a priority given that the Java Control Panel can be used by applet developers to enable the Java Console. If you feel strongly about this then please file a bug and vote on it.

> Amateurs!!!

If you are interested in helping to improve our group's engineering practices then I would encourage you to submit your resume for consideration. I believe there are open positions listed on sun.com (although I don't have the req #'s in front of me) or you can email me directly at my java.net account.

demonduck
Offline
Joined: 2008-03-14
Points: 0

I look forward to the time when I will no longer have to look at that orange monstrosity.

As an experiment, the draggable applet is interesting but given all the other pressing
issues you admit to -- a waste of valuable man hours.

I disagree that the behavior you have given the draggable applet is sensible. The particular
applet instance should [b]ALWAYS [/b]be connected to the page that it was launched from
regardless of the state of that page -- active or not. Imagine a user doing some work
in the applet; dragging it to the desktop to save it; going to another page to perhaps
get some data or whatever; then coming back to the page that launched the original
applet and getting a second copy. There are an infinite number of imaginable situations
where that's not good behavior on the part of the draggable applet (DA).

Sometime in the future, you have to figure out a way to maintain the DA's connection
to the page that launched it and reconnect the applet to that page.

And there [b]HAS [/b]to be an AppletDragged listener and an AppletDraggedEvent so the
applet programmer can listen for that event and take appropriate steps. The
design of the listener would be pretty straight forward within a fairly broad number
of possible implementations.

I personally will probably never use JNLP or JavaFX. I certainly hope others find those
features useful because you seem to be putting a lot of effort into them. I hope the
cost/benefit of that effort balances on the plus side.

The applet life cycle is still not right using Java 1.6.0.11 with FF2 and/or IE6. By
SUN's own documentation as seen here:

https://java.sun.com/docs/books/tutorial/deployment/applet/appletMethods...

My interpretation is:
init() should be called once when the applet is created.
Once the applet is initialize, the state of that applet should be preserved even
though the user goes to other pages. Now, if the user goes to another
page, or closes the tab, stop() and destroy() is called and when the user
returns, init() and start() are called again. That's wrong.

The applet should be stopped with a call to stop() and restarted with a call to start()
but a new applet should not be created. The applet can live happily in the JVM as
long as the JVM for that browser session is active. This preserves the state of the
applet and any work the user might be actively engaged in.

start() should be called each time the applet is started -- duh! As part of the actions
described above. When the tab or page or browser is not being viewed by the user,
the applet should be stopped and restarted when the user returns to the page.

stop() should be called each time the applet is stopped. Look at your own
documentation for stop(). That's what it says. You don't call stop() when the tab is
not being viewed or the browser itself is iconified. The applet keeps running.
That's wrong.

destroy() should be called [b]ONLY [/b]when the JVM running the applet
is stopped. destroy() is now called when the page is left and then the applet is
recreated when the page is returned to. That's wrong.

So while the currently implemented lifecycle is robust -- it's [b]WRONG[/b]!

Use the applet below to explore the lifecycle of an applet. It only prints out the calls
to init(); start(); stop(); destroy() in the console.

http://pancyl.com/AppletBug.htm

Software engineering is in itself non-trivial. If you want a trivial job, flip burgers at
MickyD's. I imagine that reimplementing the Tools menu to show the Java Console
menu item is non-trivial. You shouldn't have unimplemented it in the first place.
Doing non-trivial software engineering is what you get paid the big bucks for.
Stop whining.

As for submitting my resume -- no thanks. I opted out of the cubicle dwelling wack'a'mole
lifestyle 15 years ago. I only consult. And you get my consulting here for free along
with many others who are even more technically capable than myself. The problem
is you don't listen. When someone comes forth with an idea, suggestion or complaint
your response is to dismiss, denigrate and rationalize your decisions so as to avoid
making any use of the potentially valuable input you get on a daily basis for free.

That's not just your problem -- it's all of us' problem....

kbr
Offline
Joined: 2003-06-16
Points: 0

The current applet lifecycle behavior is as intended. When applets were first introduced in HotJava, multiple calls to start/stop were allowed, and the applet instance would be cached between visits to the same web page. This behavior was changed several releases ago to no longer cache applet instances by default. This means that you will get calls to init / start upon visiting a page with an applet, and stop / destroy upon leaving the page. It is possible to request the previous lifecycle behavior, but I strongly recommend against it, even though the implementation of this functionality works well in the new Java Plug-In. Google for "legacy lifecycle".

There are no explicit events in the current browser plugin specifications for minimizing the browser window or switching to a different tab. This makes implementing calling stop() / start() upon these events basically impossible. If you would like to pursue adding this functionality I recommend you get involved with the plugin development mailing list at mozilla.org.

There are already mechanisms for receiving events related to dragged-out applets. See http://java.sun.com/javase/6/webnotes/6u10/plugin2/index.html#EXPERIMENT... . Since public APIs can't be added in Java update releases, they were added as a sort of informal protocol (cf. Objective-C).

The Java Plug-In in 6u10 represents a complete rewrite of the applet support which was necessary in order to get to a point where we can feasibly resolve the outstanding bugs. The previous implementation and architecture were unmaintainable. We are working on addressing both new and previous bugs. Many longstanding bugs were fixed as part of the new Java Plug-In and will be reevaluated and closed in the future.