Skip to main content

Solve the mixing of lightweight/heavyweight components

12 replies [Last post]
keeskuip
Offline
Joined: 2003-06-17
Points: 0

I would like to embed heavyweight components in
swing. This is now very problematic. Please solve.

Kees.

Reply viewing options

Select your preferred way to display the comments and click "Save settings" to activate your changes.
denismo
Offline
Joined: 2003-06-28
Points: 0

Restating what other people pointed to: this feature is to enable heavyweight components, not just AWT, to be embedded into Swing. Which means many other native third-party widgets or ActiveX components.

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

Both mozilla and JMF use an overlay technique, which creates more or less a borderless window over the swing-app which moves if the swing app move.

If this would not be true, performance would be really terrible because EVERYTHING would have to go first into a backbuffer -> through swing app.

lg Clemens

coldbyte
Offline
Joined: 2004-06-28
Points: 0

Not to forget Java3D. It's just unusable if the Canvas won't integrate into a swing gui. May it be possible that there is actually no solution (without major performance degrades)? If so, i really would like to have a statement from SUN.

If that problem is not solved it's really a reason for a developer to abandon java.

Many applications (CAD,3D modelling tools, game tools like world editors, etc.) just need this feature. A complete set of applications can not be implemented in java just because of this problem, which is discussed and discussed and discussed ... - but no solution is presented.

This bug has no priority because those developers don't even take java as a serious development tool in account as long as you don't have this issue solved.

I have put all my hope in Mustang, but obiously - in vain.

Message was edited by: coldbyte

coxcu
Offline
Joined: 2003-06-11
Points: 0

It looks like you can already do this for ActiveX components via a third-party tool.

Embedding ActiveX Controls (OCXs) as Java components in Java AWT Containers
http://j-integra.intrinsyc.com/com/doc/ocx/

Does anybody know how well this works?
Are there similar solutions for other types of components?

I'm sure you still have to be mindful of the limitations of mixing.

Mixing heavy and light components
http://java.sun.com/products/jfc/tsc/articles/mixing/

coldbyte
Offline
Joined: 2004-06-28
Points: 0

The problem is obviously that some people confuse "heavyweight" with awt. That's not the point. "Heavyweight" is everything from directx/opengl to the (already mentioned) ActiveX controls.

Please no statements like "ActiveX is MS and we don't want to use it anyway".

You surely CAN get rid of heavyweight components - if you only need some video or good ol' swing guis. But not if you want cutting edge 3d power. Would anybody say that 3dsmax or maya3d are just toys and applications not of importance. I suppose the movie industrie and 3d designers would disagree.

These are just examples what java lacks at the moment.

No offense to the people which say we don't need it - It's not of importance that some developers don't need the integration of heavyweight components. It's of importance, that some developers need it. There are people out there that are waiting for this matter to be solved urgently. If YOU don't need it - good for you.

So please think before you say "i would vote -1 for that".

Of course it should not be forgotten to trade off the pros and cons. Actually there is no con except of possible overal performance degrades (but that's just my opinion).

Perhaps then we can discuss how this subject is solved, if it can be solved and NOT about if it should be solved.
It is one of the major inconsistencies that java has. And as always - inconsistencies are ugly. It something that would really beautify java development.

Cheers!

(and please vote)

mgrev
Offline
Joined: 2003-08-12
Points: 0

I would like to vote -1 on this. Why? Am I crazy? Probably. But we need to do away with the heavy weight layer rather than intermix it more!

A quick look at the source code makes it obvious that without the heavyweight intermix the code path would be much cleaner...

Clean is good; and bug free.

One have to sacrifice something got get something. I vote for AWT (excepty for JFrame, Window and JDialog and native events of course)

Cheers,
Mikael Grev

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

I would also vote for better java2d/swing performance instead making awt support/integration better.

The only problem which is left is JMF with video playback, since they use an overlay technique not really working well in swing apps.

All other apps I use or develop do either use AWT or Swing - why should anyone want to mix both worlds?
Its also not too hard to translate awt apps to swing...

lg Clemens

keeskuip
Offline
Joined: 2003-06-17
Points: 0

I want to embed a heavyweight browser (mozilla) into
a lightweight swing application.
I want to embed existing activex into a lightweight swing
application.
I do NOT want to embed AWT into swing!

Kees Kuip.

markf
Offline
Joined: 2005-01-20
Points: 0

I have to concurr here. Java applications don't exist in a void. Embedding is a very real issue for some applications.

denismo
Offline
Joined: 2003-06-28
Points: 0

Please vote on 4811096 if you need it.

It is still planned for Mustang, but with lower probability - the number of issues in the implementation grows, while the amount of time left for implementation decreases.

harikrushna
Offline
Joined: 2005-02-25
Points: 0

sir
i want to trasmit some data using connection oriented socket in java
i want to use ip_tos field of ip header
i am able to set the value of precedence field for datagram sockets
using settrafficclass of java
but if i use same thing for tcp sockets it is disabling
i want to give priority to my connection oriented socket using precedence field
i want iptos_,lowdelay for my connection oriented socket
if it is possible
pls send me the code

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

Hi,

> I would like to embed heavyweight components in
> swing. This is now very problematic. Please solve.
>
> Kees.

This is one of the bug/features that was supposed to be
done in Mustang. I will check on the status.

Thanks,
Bino.