🚀 go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

Article View: borland.public.jbuilder.java.language
Article #7743

JTextPane URL won't update

#7743
From: Bernie
Date: Tue, 22 May 2001 03:18
39 lines
1944 bytes
After loading an HTML page into a JTextPane from disk,
subsequent loads using .setPage do not display the new
HTML page, and the first one loaded remains displayed.
The contents of the HTML file (myfile.html) on disk is
updated, yet the page displayed in the JTextPane remains
the same.  I have a  hyperLinkUpdate, so I'm not sure why
it isn't displaying subsequent pages.  What do I have to do
to get the JTextPane to display additional HTML pages?

-Thanks


void jButton1_actionPerformed(ActionEvent e) {
    try {
      ParseURLData(vLines);
      WriteHTMLFile(userDir + "/myfile.html", vPage);
      URL url = new URL("file:" + userDir + "/myfile.html");
      jTextPane1.setPage(url);
      jTextPane1.repaint();
    }
    catch(Exception ex) {
      ex.printStackTrace();
    }

  }


  void jTextPane1_hyperlinkUpdate(HyperlinkEvent e) {

    try {
      if (e.getEventType() == HyperlinkEvent.EventType.ACTIVATED)
        jTextPane1.setPage(e.getURL());
    }
    catch (IOException ex) {
      ex.printStackTrace(System.err);
    }

  }
Technical Details
Message-ID: <3B09DA6F.F5486D1B@att.net>
Path: arc1-ca.pugleaf.net!archiver1.google.com!newsfeed.google.com!sn-xit-02!sn-xit-03!supernews.com!logbridge.uoregon.edu!news.maxwell.syr.edu!newsfeed00.sul.t-online.de!newsfeed01.sul.t-online.de!t-online.de!dnews

Show Full Headers
Complete Article Headers
X-Google-Language: ENGLISH,ASCII-7-bit
X-Google-Thread: f74b3,4f978b5de2a94040,start
X-Google-Attributes: gidf74b3,public
X-Google-ArrivalTime: 2001-05-21 20:38:53 PST
Message-ID: <3B09DA6F.F5486D1B@att.net>
Date: Mon, 21 May 2001 23:18:07 -0400
From: Bernie <bfb@att.net>
X-Mailer: Mozilla 4.75 [en] (X11; U; Linux 2.2.16-22 i686)
X-Accept-Language: en
MIME-Version: 1.0
Newsgroups: borland.public.jbuilder.java.language
Subject: JTextPane URL won't update
Content-Type: text/plain; charset=us-ascii
Content-Transfer-Encoding: 7bit
NNTP-Posting-Host: 12.90.25.63
X-Trace: dnews 990501581 12.90.25.63 (21 May 2001 20:19:41 -0700)
Lines: 40
Path: arc1-ca.pugleaf.net!archiver1.google.com!newsfeed.google.com!sn-xit-02!sn-xit-03!supernews.com!logbridge.uoregon.edu!news.maxwell.syr.edu!newsfeed00.sul.t-online.de!newsfeed01.sul.t-online.de!t-online.de!dnews