Well, that was easy! Twitter time!
This is the first image ever, I think, of a Java Desktop application (or any Java application, for that matter) dynamically embedded in a web page as auto-generated JavaScript, simultaneously created with its Java equivalent in real time.
-
fully functional (other than a few bugs)- functions exactly like Java, but better (because we have the full range of interactivity and context that browsers bring to the table)
-
fully modular (unlike GWT)
-
fully interactive Java+JavaScript development environment
-
completely automated command-line-based production environment
All we are doing here is putting full frames in their undecorated ( frame.setUndecorated(true) ) Java state into specified divs on the page. Java has no issue with in that – the frames are self-contained entities that have always been able to be moved anywhere on the page anyway. We are specifying that in the page’s HTML code, not in Java.
The web page designer just has to add a div with an id of the frame’s name appended with “-div”, placing that wherever they want a frame to be. Frames that do not have matching divs pop up as usual. Here, for example:
In this example, the Jalview desktop frame (using JDesktop) has a size and position that is set on the HTML page, and the alignment frame (a JInternalFrame) is embedded in a div at (100,100).
At least for this part of the operation, there is no problem with multi-instance pages, where more than one Java application is open. We need to check all static variables, though, to make sure that there is no conflict. Note that each instance appears in Java to run in its own thread group, and it is that group that keeps track of which applet is which. (Actually, the thread group is assigned each time an event brings us back into the Java event queue.)
I’m headed to Davidson College, in North Carolina, to work with my collaborator on the Physlets-JS project for a few days, so no Skype for me this Tuesday.
Getting this checked in now; leaving in 4 hours.
Bob
···
Robert M. Hanson
Professor of Chemistry
St. Olaf College
Northfield, MN
http://www.stolaf.edu/people/hansonr
If nature does not answer first what we want,
it is better to take what answer we get.
– Josiah Willard Gibbs, Lecture XXX, Monday, February 5, 1900