Your problem appears to be related to bug # 4334657 (though there are no
null BGCOLOR references on the main Google page).  The bug is marked as
fixed for merlin-beta (i.e., the first 1.4 beta).


ref:

  http://developer.java.sun.com/developer/bugParade/bugs/4334657.html

    (its test case, run with 1.3.1_01 against http://www.google.com,
       produces exactly the output you saw)


This bug can also be found on Sun's Web site via this set of search
criteria:
  
http://search.java.sun.com/Search/java?qt=%2Bclasses_swing++%2Bjeditorpane+%2B%22javax.swing.text.html.CSS.stringToColor%22&col=obug&rf=0

(remove any stray linefeeds/CRs that your mail tool may have introduced
into the search URL)


Unfortunately, that bug's test case produces a blank screen (on win32)
under 1.4 beta2.  I'm not sure whether this behavior is related to UI or
stream issues.  Will try to look at it more later.  However, you may
want to test your code against 1.4 beta2 to see if you get more useful
results.

To get merlin-beta2 (1.4 beta 2):

   http://java.sun.com/products/j2se/1.4

    java version "1.4.0-beta2"
    Java(TM) 2 Runtime Environment, Standard Edition (build
1.4.0-beta2-b77)
    Java HotSpot(TM) Client VM (build 1.4.0-beta2-b77, mixed mode)


Best Regards,

Kevin Ryan
http://www.knb.com/rkevinr




"Frank D. Greco" wrote:
> 
> I have a little mini-browser that I've incorporated into some
> apps... nothing fancy (nor commercially viable).  Mostly for
> help/doc pages and simple sites.
> 
> One of those "simple" sites was "www.Google.com"   Everything
> worked fine up until recently.  The Google guys changed their
> home page to incorporate some useful functionality (e.g., search
> newsgroups, etc).
> 
> However ever since then, I'm getting exceptions in the bowels
> of JEditorPane (seen below).  Other simple sites seem to work
> fine (relatively speaking).  Anyone else experience this problem?
> I'm using JDK 1.3.1 on W2K.
> 
> Thanks,
> 
> Frank G.
> ====================================================================
> java.lang.StringIndexOutOfBoundsException: String index out of range: 0
>          at java.lang.String.charAt(String.java:516)
>          at javax.swing.text.html.CSS.stringToColor(CSS.java:1099)
>          at javax.swing.text.html.CSS$ColorValue.parseCssValue(CSS.java:1960)
>          at javax.swing.text.html.CSS.getInternalCSSValue(CSS.java:531)
>          at javax.swing.text.html.CSS.addInternalCSSValue(CSS.java:516)
>          at
> javax.swing.text.html.StyleSheet.addCSSAttribute(StyleSheet.java:436)
>          at
> javax.swing.text.html.StyleSheet$CssParser.handleValue(StyleSheet.java:3252)
>          at
> javax.swing.text.html.CSSParser.parseDeclaration(CSSParser.java:340)
>          at
> javax.swing.text.html.CSSParser.parseDeclarationBlock(CSSParser.java:307)
>          at javax.swing.text.html.CSSParser.parseRuleSet(CSSParser.java:254)
>          at
> javax.swing.text.html.CSSParser.getNextStatement(CSSParser.java:160)
>          at javax.swing.text.html.CSSParser.parse(CSSParser.java:135)
>          at
> javax.swing.text.html.StyleSheet$CssParser.parse(StyleSheet.java:3190)
>          at javax.swing.text.html.StyleSheet.addRule(StyleSheet.java:245)
>          at
> javax.swing.text.html.HTMLDocument$HTMLReader.addCSSRules(HTMLDocument.java:3084)
>          at
> javax.swing.text.html.HTMLDocument$HTMLReader$HeadAction.end(HTMLDocument.java:2276)
>          at
> javax.swing.text.html.HTMLDocument$HTMLReader.handleEndTag(HTMLDocument.java:2040)
>          at
> javax.swing.text.html.parser.DocumentParser.handleEndTag(DocumentParser.java:220)
>          at javax.swing.text.html.parser.Parser.parse(Parser.java:2005)
>          at
> javax.swing.text.html.parser.DocumentParser.parse(DocumentParser.java:109)
>          at
> javax.swing.text.html.parser.ParserDelegator.parse(ParserDelegator.java:74)
>          at javax.swing.text.html.HTMLEditorKit.read(HTMLEditorKit.java:239)
>          at javax.swing.JEditorPane.read(JEditorPane.java:421)
>          at javax.swing.JEditorPane.read(JEditorPane.java:439)
>          at javax.swing.JEditorPane$PageLoader.run(JEditorPane.java:468)
> +======================================================================+
> | Crossroads Technologies Inc, 55 Broad Street, 28th Fl, NYC, NY 10004 |
> |  Enterprise Java Engineering                                         |
> | Email: [EMAIL PROTECTED]         Web: www.CrossroadsTech.com |
> | Pager: 800-495-6244                   ePager: [EMAIL PROTECTED]     |
> | Voice: 212-482-5280 x229                 Fax: 212-482-5281           |
> +======================================================================+
> 
> _______________________________________________
> Advanced-swing mailing list
> [EMAIL PROTECTED]
> http://eos.dk/mailman/listinfo/advanced-swing
_______________________________________________
Advanced-swing mailing list
[EMAIL PROTECTED]
http://eos.dk/mailman/listinfo/advanced-swing

Reply via email to