Mailing Lists: Apple Mailing Lists

Image of Mac OS face in stamp
 
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Java web browser component




On Aug 29, 2005, at 12:14 PM, Doug Zwick wrote:

Shuichi KURABAYASHI wrote:


Ho Kit Robert Ong wrote:


Does anyone know where can I find Java base Web Browser component for
Mac OS X?
My project need to have a internal browser for time sheet, and I  cannot
find anyone that is compatible with 1.4.2 and Mac OS X.



There is the HTMLEditorKit stuff as well. No native required. Depending on the nature of this time sheet app maybe.

I recommend the WebKit & Java integration.

It uses JNI and com.apple.eawt.CocoaComponent, and you can easily
integrate the webkit4java with existing Swing components.


This project is now up on Source Force as WebKitJava:


Of particular note, embedded WebKit in a Java app will fail
if directed to a Java applet unless Java is disabled via the
WebPreferences class (Objective C). Of course, the applet
will not work when that is done, but at least the failure is
not a catastrophic one. This is due to a limitation of only
one JVM running in a process,

Out of curiosity I downloaded this, I had looked at it a little in the past. The demo is a small browser type application that permits navigation and as-is it crashes if directed to a page with an applet, as warned. Does it permit processing or editing of individual tags? I'm not sure what all is involved in the DOM support, if that just maps or provides access for _javascript_ or if you can get info on individual tags. I would guess if you can determine the tag info for the (preference deactivated) applet you could either turn around and runtime another java or WebKit process or just run the applet yourself. 
The HTMLEditorKit for whatever reason I don't think includes either applet tag handling or _javascript_ support. Parsing the applet related and somehow linking in Mozilla Rhino for the _javascript_ almost seem like they should both be do-able. In fact I think I have considered doing them both, but knowing very little at the time of how _javascript_ related to the DOM stuff and what all went into that I didn't get too far. I still don't have a comprehensive understanding. Splicing the applet support in I'm not sure why I didn't complete, that really doesn't seem to have the _javascript_ difficulties. Just parse the tag and run the applet. The same seems like it should possibly apply here. If you can parse the info you can run the code? 
 
and the applet requires a
different set of parameters than an application.

You need to have some classes providing the AppletContext to do it from java. I did a little messing with that based on a java world example. For most simple purposes it allowed running applets. Actually commandline although I never really got into handling parameters correctly...

public class run
    extends JFrame
    implements    java.awt.event.ActionListener ,    // mjh 09.06.99 added ActionListener
        AppletStub, AppletContext, URLStreamHandlerFactory {


Mike Hall        email@hidden



 _______________________________________________
Do not post admin requests to the list. They will be ignored.
Java-dev mailing list      (email@hidden)
Help/Unsubscribe/Update your Subscription:
http://lists.apple.com/mailman/options/java-dev/email@hidden

This email sent to email@hidden

References: 
 >Re: Java web browser component (From: Doug Zwick <email@hidden>)



Visit the Apple Store online or at retail locations.
1-800-MY-APPLE

Contact Apple | Terms of Use | Privacy Policy

Copyright © 2007 Apple Inc. All rights reserved.