I would like to embed heavyweight components in
swing. This is now very problematic. Please solve.
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.
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.
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
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
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
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.
(and please vote)
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)
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...
I want to embed a heavyweight browser (mozilla) into
a lightweight swing application.
I want to embed existing activex into a lightweight swing
I do NOT want to embed AWT into swing!
I have to concurr here. Java applications don't exist in a void. Embedding is a very real issue for some applications.
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.
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
> I would like to embed heavyweight components in
> swing. This is now very problematic. Please solve.
This is one of the bug/features that was supposed to be
done in Mustang. I will check on the status.
Your use of this web site or any of its content or software indicates your agreement to be bound by these Terms of Participation.
Copyright © 2014, Oracle and/or its affiliates. All rights reserved. Oracle and Java are registered trademarks of Oracle and/or its affiliates. Other names may be trademarks of their respective owners.