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
Post Reply
Bookmark Topic
Watch Topic
New Topic
programming forums
Java
Mobile
Certification
Databases
Caching
Books
Engineering
Micro Controllers
OS
Languages
Paradigms
IDEs
Build Tools
Frameworks
Application Servers
Open Source
This Site
Careers
Other
Pie Elite
all forums
this forum made possible by our volunteer staff, including ...
Marshals:
Tim Cooke
Campbell Ritchie
paul wheaton
Ron McLeod
Devaka Cooray
Sheriffs:
Jeanne Boyarsky
Liutauras Vilda
Paul Clapham
Saloon Keepers:
Tim Holloway
Carey Brown
Piet Souris
Bartenders:
Forum:
Java in General
jEditorPane clearing cache
Jamie Wool
Ranch Hand
Posts: 49
posted 19 years ago
Number of slices to send:
Optional 'thank-you' note:
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
Posts: 49
posted 19 years ago
Number of slices to send:
Optional 'thank-you' note:
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);
With a little knowledge, a
cast iron skillet
is non-stick and lasts a lifetime.
reply
reply
Bookmark Topic
Watch Topic
New Topic
Boost this thread!
Similar Threads
JEditorPane and JScrollPane
Connection to MySQL
how to create hyperlink from java
Link to open using JEditor Pane
Problem with JEditorPane
More...