Hi all,
 
Just to share my conclusions with the group, after investigating the matters below I have concluded with the following conclusions:
 
1) In order to enable quick startup of the application I have implemented a simple caching system that loads the HTML file into the JTextPane when the containing panel is first viewed (instead of loading ALL HTML files at startup).
 
2) I have added a HyperlinkListener that catches all link events, parses the HREF within the clicked link and invokes an  emulation of a click on the relevant node in the navigation tree.
 
Best Regards,
David Treves.
----- Original Message -----
To: JDJList
Sent: Sunday, May 12, 2002 9:39 AM
Subject: [jdjlist] Using SWING's JTextPane

Hi all,
 
I am about to develop a desktop application, based on SWING (jdk 1.4). The basic structure of the application is like a CHM file (MS help files), meaning a navigation tree on the left and content on the right. Some content is pure text and some is input objects (checkboxes, text fields etc.)
 
I have a few design questions for the group:
 
1) I want to use javax.swing.JTextPane in order to have better looking texts. What is the overhead of loading HTML content  from HTML files every time the application loads? Will it matter if I "hardcode" the content in a StringBuffer? (This saves file accessing).
 
2) I want to be able to have some links within the HTML content that will take the user to other pages in the application. How can I add a link that when the user clicks, it will emulate a click on a tree node (the navigation tree on the left), I ask since it is an HTML link (rendered in a java GUI object) that is supposed to invoke a java event. Should I write my own HTML parser for that?
 
 
Thanks in advance,
David Treves.
 
To change your membership options, refer to:
http://www.sys-con.com/java/list.cfm
To change your membership options, refer to:
http://www.sys-con.com/java/list.cfm

Reply via email to