You can see the effect with on page
http://mindprod.com/applet/canadiantax.html
--
Roedy Green Canadian Mind Products
http://mindprod.com
To err is human, but to really foul things up requires a computer.
~ Farmer's Almanac
It is breathtaking how a misplaced comma in a computer program can
shred megabytes of data in seconds.
Looks fine to me.
JRE 6.0.20
Firefox 3.6.12
df.
"... the buyer’s home province ..."
--
Lew
Ceci n'est pas une pipe.
>> You can see the effect with on page
>> http://mindprod.com/applet/canadiantax.html
>
>Looks fine to me.
>
>JRE 6.0.20
>Firefox 3.6.12
At the bottom of the applet box you should see some <li> style
instructions in green. The text of them is repeated below in the HTML.
I would have blamed the video driver, but the layout puts a bunch of
white space at the top, as if it thought the JEditorPane/JLabel
rendered to empty.
I have JRE 1.6.0_23. I have both 32 and 64 bit JREs installed.
System properties suggest it is using 32-bit.
When an applet starts, it leaves the box solid black for about a
second. This seems excessively long, and I wondered if it were
indicative of video driver bugs.
It would be nice to be able to include screen snapshot in newsgroup
postings to accurately describe what you are seeing or what you are
expected to see.
> On Fri, 21 Jan 2011 20:04:59 +0100, Daniele Futtorovic
> <da.fut...@laposte.net.invalid> wrote, quoted or indirectly quoted
> someone who said :
>
> >> You can see the effect with on page
> >> http://mindprod.com/applet/canadiantax.html
> >
> >Looks fine to me.
> >
> >JRE 6.0.20
> >Firefox 3.6.12
>
> At the bottom of the applet box you should see some <li> style
> instructions in green. The text of them is repeated below in the
> HTML. I would have blamed the video driver, but the layout puts a
> bunch of white space at the top, as if it thought the
> JEditorPane/JLabel rendered to empty.
>
> I have JRE 1.6.0_23. I have both 32 and 64 bit JREs installed. System
> properties suggest it is using 32-bit.
>
> When an applet starts, it leaves the box solid black for about a
> second. This seems excessively long, and I wondered if it were
> indicative of video driver bugs.
>
> It would be nice to be able to include screen snapshot in newsgroup
> postings to accurately describe what you are seeing or what you are
> expected to see.
Mac OS X 10.5.8, Safari 5.0.3
<http://i54.tinypic.com/16i5b1f.png>
--
John B. Matthews
trashgod at gmail dot com
<http://sites.google.com/site/drjohnbmatthews>
I discovered this bug appears with all browsers, but only if you
setText gets called more than once. setText works the first time.
I feed it this html :
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN"
"http://www.w3.org/TR/html4/loose.dtd">
<html>
<head>
<title>instructions</title>
<style
type="text/css">body{background-color:#f8f8f8;color:#339911;font-family:Dialog,sans-serif;}</style>
</head>
<body>
<p>Select buyer’s province, then either:</p>
<ul><li>Click the up/down <em>Amount of Sale</em> spinner arrows.</li>
<li>Fill in the <em>Amount of Sale</em>, then click <em>Calc
⇓</em> to find the <em>Total Payable</em>.</li>
<li>Fill in the <em>Total Payable</em>, then click <em>Calc
⇑</em> to find the original <em>Amount of Sale</em>.</li></ul>
<p>Out-of-province vendors must now collect the same tax as vendors in
the buyer’s home province.</p>
</body>
</html>
which W3C says is fine.
For some reason Firefox calls init twice, that is why the bug showed
up there but not in other browsers. To make it appear in other
browsers, just navigate to some other page then navigate back.
Then you get an error like this:
java.lang.NullPointerException
at javax.swing.text.html.parser.Parser.errorContext(Unknown
Source)
at javax.swing.text.html.parser.Parser.parse(Unknown Source)
at javax.swing.text.html.parser.DocumentParser.parse(Unknown
Source)
at javax.swing.text.html.parser.ParserDelegator.parse(Unknown
Source)
at javax.swing.text.html.HTMLEditorKit.read(Unknown Source)
at javax.swing.JEditorPane.setText(Unknown Source)
at
com.mindprod.canadiantax.CanadianTax.createComponents(CanadianTax.java:740)
at
com.mindprod.canadiantax.CanadianTax.init(CanadianTax.java:410)
at
sun.plugin2.applet.Plugin2Manager$AppletExecutionRunnable.run(Unknown
Source)
at java.lang.Thread.run(Unknown Source)
Then I see a screen like this:
http://mindprod.com/image/screenshot/canadiantax2.png
This does not make sense. When init gets called, a new JEditorPane
gets created. So how does JEditorPane even know about the previous
incarnation?
I was able to discover all kinds of people who are also getting in
trouble with this bug. It is fairly old.
http://forums.oracle.com/forums/thread.jspa?messageID=8297744&tstart=0
Supposedly adding
JEditorPane.registerEditorKitForContentType("text/html",
"javax.swing.text.html.HTMLEditorKit");
fixes the problem, but I find it does not.
><http://i54.tinypic.com/16i5b1f.png>
Apple is not rendering ’ properly. How long has Java been out?
And it STILL has blatant bugs like this??
> On Sat, 22 Jan 2011 14:30:50 -0500, "John B. Matthews"
> <nos...@nospam.invalid> wrote, quoted or indirectly quoted someone who
> said :
>
> ><http://i54.tinypic.com/16i5b1f.png>
You're welcome.
That is not limited to Apple. I get the same effect in Google Chrome
7.0.517.41 beta on Ubuntu Linux 10.04.1 on an AMD-chip PC.
"... the buyer’s home province ..." (mentioned upthread on 1/21)
Obviously Chrome recognises that the possesive should be indicated with
' :-)
--
RGB
> On Sat, 22 Jan 2011 14:30:50 -0500, "John B. Matthews"
> <nos...@nospam.invalid> wrote, quoted or indirectly quoted someone who
> said :
>
> ><http://i54.tinypic.com/16i5b1f.png>
>
> Apple is not rendering ’ properly. How long has Java been out?
> And it STILL has blatant bugs like this??
JEditorPane (as of Java 1.6) only claims to support HTML3.2 and the
rsquo entity is an HTML 4 construct.
--
Thomas A. Russ, USC/Information Sciences Institute
>JEditorPane (as of Java 1.6) only claims to support HTML3.2 and the
>rsquo entity is an HTML 4 construct.
Yikes. HTML 4 came out in 1997. That was 98 dog years ago.
I guess that means you can't count on any CSS working either!
Java is running out of steam/money on the desktop.
I have used \u2019 instead of ’
I still have not found a workaround to the rendering bug. I will try
removing all CSS.
But have you even been able to clearly identify the cases where it
doesn't work? As I said, it's fine on my box (WinXP, by the way). If
JEditorPane didn't support that entity, it shouldn't show up on my
screen, should it?
>But have you even been able to clearly identify the cases where it
>doesn't work? As I said, it's fine on my box (WinXP, by the way). If
>JEditorPane didn't support that entity, it shouldn't show up on my
>screen, should it?
IIRC CSS and ’ worked fine on my machine Windows 7 64-bit.
I have removed all entities from all my JEditorPanes in all my
programs. I have removed all style sheets and DOCTYPES, though there
is still a little embedded CSS left.