<?xml version="1.0" encoding="UTF-8"?><rss version="2.0"
	xmlns:content="http://purl.org/rss/1.0/modules/content/"
	xmlns:dc="http://purl.org/dc/elements/1.1/"
	xmlns:atom="http://www.w3.org/2005/Atom"
	xmlns:sy="http://purl.org/rss/1.0/modules/syndication/"
		>
<channel>
	<title>Comments on: HTML Labeled Components</title>
	<atom:link href="http://cafe.elharo.com/blogroll/htmlcomponents/feed/" rel="self" type="application/rss+xml" />
	<link>http://cafe.elharo.com/blogroll/htmlcomponents/</link>
	<description>Longer than a blog; shorter than a book</description>
	<lastBuildDate>Wed, 08 Feb 2012 21:45:25 +0000</lastBuildDate>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=3.1.3</generator>
	<item>
		<title>By: jimthev</title>
		<link>http://cafe.elharo.com/blogroll/htmlcomponents/comment-page-1/#comment-15</link>
		<dc:creator>jimthev</dc:creator>
		<pubDate>Fri, 06 Jan 2006 16:53:41 +0000</pubDate>
		<guid isPermaLink="false">http://minicafe.elharo.com/wordpress/java/htmlcomponents/#comment-15</guid>
		<description>&lt;h3 class=&quot;subject&quot;&gt;Active buttons in JEditorPane&lt;/h3&gt;
&lt;p&gt;To make active buttons in html rendered by a JEditorPane, we override the method:&lt;/p&gt; 

&lt;p&gt;public View create(Element elem) {&lt;/p&gt; 

&lt;p&gt;in the class HTMLEditorKit.HTMLFactory to return our own FormView for buttons.

&lt;/p&gt; &lt;p&gt;This FormView subclass overrides: &lt;/p&gt; &lt;p&gt;protected Component createComponent() { &lt;/p&gt; &lt;p&gt;To return our own Components based on the HTML.Attribute.NAME attribute of the Element. &lt;/p&gt; &lt;p&gt;For all this to work, we had to subclass JEditorPane, and HTMLEditorKit to get the our new classes to be called, but once you know that the individual components are created in the above referenced methods, the work is basically done.  A similar technique is probably possible for all HTML Labeled Components.&lt;/p&gt;</description>
		<content:encoded><![CDATA[<h3 class="subject">Active buttons in JEditorPane</h3>
<p>To make active buttons in html rendered by a JEditorPane, we override the method:</p>
<p>public View create(Element elem) {</p>
<p>in the class HTMLEditorKit.HTMLFactory to return our own FormView for buttons.</p>
<p>This FormView subclass overrides: </p>
<p>protected Component createComponent() { </p>
<p>To return our own Components based on the HTML.Attribute.NAME attribute of the Element. </p>
<p>For all this to work, we had to subclass JEditorPane, and HTMLEditorKit to get the our new classes to be called, but once you know that the individual components are created in the above referenced methods, the work is basically done.  A similar technique is probably possible for all HTML Labeled Components.</p>
]]></content:encoded>
	</item>
</channel>
</rss>

