InsertBeforeEnd works in JDK1.3 but not in JDK1.4

Any idea why this would work perfectly in JDK1.3 but not JDK1.4?
logPane = new JEditorPane();
logPane.setEditable(false);
HTMLEditorKit k = new HTMLEditorKit();
doc = (HTMLDocument)k.createDefaultDocument();
logPane.setEditorKit(k);
logPane.setDocument(doc);
logPane.setText("<div id=\"myDiv\"></div>");
Element convDiv = doc.getElement("myDiv");
doc.setInnerHTML(convDiv,"<p>Test1</p>"); // This works in both
doc.insertBeforeEnd(convDiv,"<p>Test2</p>"); // This throws exception
The setInnerHTML works fine in the JDK's. The insertBeforeEnd throws a "BadLocationException: Invalid insert" in JDK1.4 but works fine in JDK1.3...
Quite frustrating!

Well, I finally took a look at the JDK code (GapContent.java). It seems the supposedly "fixed" bug is still there in JDK1.4.0 and JDK1.4.1 (latest) (http://developer.java.sun.com/developer/bugParade/bugs/4496801.html)
The workaround is to put some characters after the div as follows:
logPane.setText("<div id=\"myDiv\"></div>&_nbsp_;");
( remove the _ in nbsp above )
Now it works in both JDK's!

Similar Messages

  • Custom F4 help in a BSP application working in Mozilla but not in IE

    Hi,
    I have created a custom F4 help in a BSP application.
    It is working in Mozilla but not in IE. I tried enabling javascript as well but still it is not working.
    Can someone please suggest a possible solution for this?

    Hi,
    See simmilar discussion in thread /thread/1883519 [original link is broken]
    I think this may be helpful for you.
    Thanks,
    Chandra

  • Why does the counter work in MAX, but not Labview?

    Please help, I have been away from Labview for over 3 months, and I am quite rusty....
    Last year, I successfully configured NI9401 to measure period (seconds) by counting the rising edges of my sensor signal.  Since then, I have aquired a new PC, and loaded all my software into it, including the Labview VI's that successfully worked on the old computer.
    I can see the digital signal using MAX and the test panel for the NI9401, so, I know my wiring and my TTL signal is OK, but, when I try to run the attached VI, nothing happens except the error below..  How do I tell this VI to look for the signal on MOD3/CTR0 and channel 14?
    Thanks. I am sure it is a small adjustment...this worked fine a few months ago...not sure what is wrong now.
    Thanks,
    Dave
    Solved!
    Go to Solution.
    Attachments:
    continuously measure period buffered_singlechannel_forum_feb_23_2012.vi ‏20 KB

    OK, now.  Resolved the issue. The vi is fine, but, some shaky wires were identified...worked in MAX but not in the vi.  Now that the connections have been tightened up, it works for both.  Sorry for the inconvenience.
    Dave

  • Works on emulators but not on mobile devices

    Hello,
    My project works on emulators but not on mobile devices (no image and on Samsung it says "unsupported file").
    Please help, I don't know what to do. My configurations: MIDP 2.1, CLDC 1.1.
    Thanks in advance.
    Edited by: Vitali.pom on Oct 27, 2011 12:01 PM

    Edit: I succeeded to solve it accidentally. I did the following: Sign the jar in Netbeans, clean and build, the jar didn't work, I wiped out the .ks from the jar and clean and build again. Now it worked.
    Edited by: Vitali.pom on Oct 30, 2011 1:28 AM

  • Wifi works at home but not when away from home

    My Wifi works at home but not when away from home, what is wrong?  I thought with a phone plan I didn't need to have a wifi connection.

    You either need WiFi or Cellular (or both). If you have neither, you can't connect to the internet.
    Most people use WiFi at home and Cellular while away from home, or connect to public WiFi networks where there are some.

  • Can't FaceTime anymore?  iPad states wifi connected and iPhone 4 states not connected?  I have wireless in my home? Not sure what happened.  Password works for iPad but not on phone?

    iPhone won't connect to wifi.  iPad is connected.  Password working on iPad but not on phone.  Can't upload software update of IOS 7.1 because phone not connecting to wifi?

    Connect iPhone to computer and open iTunes.  You will be prompted to update to iOS 7.0.  Keep your phone connected until the update is finished.

  • My apple id works on itunes but not on my ipod touch, what gives ?

    my apple id works on itunes but not on my ipod touch, what gives ?

    What are you trying to do on the iPod?
    Have you went to Settings>Store and sign out and then sign back in?

  • Album Art works for most, but not all

    I was reading previous forums on the subject, but no clear answer was given..
    The album art shows up fine in itunes and my library and works for most of my music on my ipod, but how come some album's art does appear? I have it set manually and select 'Get Info' then 'Artwork' and add it from there, then drag in the finished product to my ipod. I've been doing that and it works fine for most of the albums, but every so often, the album art will not appear on my ipod. Am I doing something wrong? I take them all from the same source (amazon.com) but it makes no sense to me how some randomly don't appear.
    I tried deleting the artwork and re-adding it, but nothing happened again. If you could answer why it works for most but not all or how I can get the album art to appear for the ones it will not by re-doing something, it would be appreciated. thanks.

    I encountered the same problem in the beginning. When I compared the size of the original images, the working ones seemed to be smaller in general, so I reduced the size of all covers I intended to upload on the pod to 300x300 pixels.
    This seemed to work - for 2 days. I bought the pod on friday, had pictures on sunday, but on Monday (after the first time the pod was fully discharged) none were left left.
    So I ended searching this forum for related problems...
    And decided to join my problem to this entry.

  • How to send active links in email from firefox. Works in IE but not Firefox... Is there a setting to change?

    how to send active links in email from firefox. Works in IE but not Firefox... Is there a setting to change?
    == This happened ==
    Every time Firefox opened
    == Always

    Check with your web mail service provider for help with that issue.

  • Medical app from Intuit works in IE, but not Firefox.

    Encrypted medical app works in new IE, but not Firefox. Everything works down to the end, and click on "continue" and nothing happens. A tech and I have spent hours on this. Did not work on FF5 or 6. Did not work on old IE, but did on fresh new version with no data files copied in.

    If it works in IE but not FF, then it has nothing to do with the mp3s. More likely it's because of the HTML on the page.
    To start, page is missing DOCTYPE declaration... a MAJOR problem. The DOCTYPE declares which set of rules the browser will use to display the page. Without it, different browsers go crazy or do not work at all.
    http://www.w3schools.com/tags/tag_DOCTYPE.asp
    Validate the html code here:
    http://validator.w3.org/
    You will have to fix all the errors if you want this to work in all browsers.
    Best wishes,
    Adninjastrator

  • Flash Player works in Safari but not Internet Explorer 9

    I've installed Flash Player 10.3 and it works in Safari but not Internet Explorer 9. When I look in Manage Add-Ins I see Flash Shockwave but not Flash Player. My operating system is Windows Vista Ultimate (32bit). Safari is 5.0.5 and IE 9 is 9.0.8112.16421. I've tried uninstalling and re-installing Flash Player and uninstalling Norton 360. Nothing has worked so far. Can you help?

    Thank you for your reply. Shockwave is loaded and enabled.
    The files in flash directory are: a folder called FlashPlayerTrust: file, flash10q.ocx: file, FlashInstall.log; file, FlashUtil10q_ActiveX.dll; file, FlashUtil10q_ActiveX.exe, file, install.log.
    There is no file: NPSWF32.dll.
    When I test the browsers I get no spinning logo in either Safari or IE9. Safari says: missing plug-in, where I think the logo should be. IE-9 says nothing at the same location.
    Thanks.

  • Navigation works in IE but not Firefox or Safari!

    Hi guys
    Why do my nav links on the hompage work in IE but not in Firefox and Safari? http://www.jasonkieck.com/
    Any help would be appreciated

    The main reason is you have a <div id="bg_grid"> at the end of your html that is essentially over the top of everything else on your page, including your links. All clicks go to that <div> rather than your links undeneath it. I'm kind of surprised it works in IE to be honest.
    You do also have a ton of errors as Gramps points out, but that particular issue is not technically an error, so I have a feeling you could fix the ~100 problems shown by the validator and still have the issue.
    You could use z-index to "order the stack" as it were. Changing the z-index attributes for the css of those elements will allow you to change their order, regardless of their location in the html. A higher z-index number, the "closer" it is to the viewer (higher on the stack).
    Right now, they are both set to 1, so the one that comes later in the html is on top.
    Adding z-index:999 to the menu <div>  should do it,

  • Spry menubar works in IE, but not Firefox

    I added a very simple Spry horizontal menubar to the top of all pages in my web (I'm using DWCS4 and Spry 1.6). When I preview it in Firefox locally, it seems to work, but when it is uploaded to the web server it works in IE, but not in Firefox. Instead of a menubar, I see a stack of bulleted hyperlinks. In IE, it displays properly.
    Website is http://www.stevegoldman.com.
    How can I fix this problem so that it works with all browsers properly?
    -- Martin

    I just tested your site with firefox (latest version) and it works just fine. I also tested it in IE: 7.0 and it worked fine for that too. Looks like you have either fixed the problem or you have a different version of firefox than me or something.
    Favorite qoute: "do unto other as you would do unto yourself"
    Favorite hobby: airsoft / electric aeg airsoft guns
    Airsoft Sniper Rifles

  • Spry tooltip works in IE but not Firefox

    Hi,
    I don't understand or  can't figure out what I have done wrong. I have created a tooltip for  the last product  (4 inch diameter Vortex Water Revitalizer  in  copper (special order)) on the page: http://www.alivewater.net/order.htm
    It  works in IE but not Firefox... I can't figure out why... can you help  me and see what I have done wrong?
    Eternally grateful,
    Starry

    I think I fixed the problem.. maybe you had looked at it after it was fixed. I do appreciate your help though!

  • Works in IE but not FireFox?

    site is here
    http://carolyoungs.myartsonline.com/
    when i hosted it on a different server it worked in both browsers, now i changed to a different free host because of the mp3 file i have with the site, and some sites will not host mp3 and it only works with IE
    can anyone help me out?

    If it works in IE but not FF, then it has nothing to do with the mp3s. More likely it's because of the HTML on the page.
    To start, page is missing DOCTYPE declaration... a MAJOR problem. The DOCTYPE declares which set of rules the browser will use to display the page. Without it, different browsers go crazy or do not work at all.
    http://www.w3schools.com/tags/tag_DOCTYPE.asp
    Validate the html code here:
    http://validator.w3.org/
    You will have to fix all the errors if you want this to work in all browsers.
    Best wishes,
    Adninjastrator

  • Spry form validation working in IE but not in Firefox or...

    Ok putting together a contact us form and would like a few
    fields to be required. It works in IE7 but not in Firefox, Safari
    or Google Chrome. In IE7 I get the error msg for no valid email but
    in the other browsers it just does nothing. Here is the link to the
    page
    Aspen
    Homes
    Can anyone help with this? I have used Spry on a couple other
    site and never had an issue. I am updated to the most recent
    version also. I am running
    Vista Ultimate (64-bit)
    DW CS3 or DW CS4 (both do the same thing)
    I have attached my code here in a txt file
    Page
    Code
    thanks
    B

    Anyone?

Maybe you are looking for

  • Report on separate sheets

    In my application a page has a table with data rows. The source for the region is a PL/SQL-statement which generates the data rows. The data rows are grouped by the frist table column (person). The break formatting is at the first column. I have the

  • How to send a encrypted packet to the REST API Service using Fiddler or Post Man

    Hi, I am trying to send encrypted (AES) JSON packet to the REST API on the Azure cloud using tools like Fiddler. I am trying to use POST method and attaching the encrypted .aes file to the Fiddler tool. I am getting the 3 types of error messages. 1)

  • IPod not playing into Left side speaker

    I've noticed recently that when I play my iPod in my car there is no sound coming out of my left side speakers (front & back). When my radio is on the speakers are fine, so I've eliminated that from the equation. So is it my iPod itself (settings?) t

  • APD Query against ODS - BI7

    Hi, Executing a query in APD against an ODS is causing it to first do 'subselects' for each characteristic  - scanning the whole ODS to find all values - before it does the main select (again scanning the ODS I think). If I have a FISCPER field in OD

  • Having trouble making an in app purchase on iPhone, Help?

    Having a problem making an in app purchase off a game I have downloaded on my iPhone. Using my TD VISA DEBIT too make the purchase (basically works as a pre paid visa credit card). The price of the in app purchase is $19.99, and I've entered in my bi