Search...
FAQs
Subscribe
Pie
FAQs
Recent topics
Flagged topics
Hot topics
Best topics
Search...
Search within Java in General
Search Coderanch
Advance search
Google search
Register / Login
Forums
Register
Login
Java
»
Java in General
jEditorPane clearing cache
Jamie Wool
,
Ranch Hand
May 08, 2005 10:50:00
(0 cow)
(0 skulls)
+Pie
Number of slices to send:
Send
I have jEditorpane that displays a html file, it works fine, but if the html file updates it won't reload with the updated version. Is there a way of forcing the jEditorPane to load the file
JOptionPane.showMessageDialog(this,"There is a problem with the FID Functions"); } if (errorFlag==false){ try{ jEditorPane2.setPage("file:///C:/Report.html"); }catch(Exception ex){ System.out.println("HTMLnot found"); //ex.printStackTrace(); } salesPrintButton.setEnabled(true); } .... private void jEditorPane2HyperlinkUpdate(javax.swing.event.HyperlinkEvent evt) { try{ if(evt.getEventType() == evt.getEventType().ACTIVATED){ jEditorPane2.setPage(evt.getURL()); } }catch(Exception ex){ ex.printStackTrace(System.err); }// TODO add your handling code here: }
Jamie Wool
,
Ranch Hand
May 08, 2005 17:39:00
(0 cow)
(0 skulls)
+Pie
Number of slices to send:
Send
Managed to fix it, forced the page to load another empty html page and the reload. That flushed it out
if (errorFlag == true) { JOptionPane.showMessageDialog(this,"There is a problem with the FID Functions"); } if (errorFlag==false){ try{ try{ String clearadd = this.getClass().getResource("/FrontEnd/Clear.html").getFile().toString(); String st = "file://"; st = st.concat(clearadd); jEditorPane2.setPage(st); } catch (Exception e) {} jEditorPane2.setPage("file:///C:/Report.html"); }catch(Exception ex){ } salesPrintButton.setEnabled(true);
Post by:
autobot
I have a knack for fixing things like this ... um ... sorry ... here is a consilitory tiny ad:
a bit of art, as a gift, that will fit in a stocking
https://gardener-gift.com
reply
reply
This thread has been viewed 1301 times.
Similar Threads
JEditorPane and JScrollPane
Connection to MySQL
how to create hyperlink from java
Link to open using JEditor Pane
Problem with JEditorPane
More...
All times above are in ranch (not your local) time.
The current ranch time is
Mar 28, 2024 15:57:08
.