<?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: Displaying validation error, and beyond, and far beyond</title>
	<atom:link href="http://www.jidesoft.com/blog/2007/08/27/displaying-validation-error/feed/" rel="self" type="application/rss+xml" />
	<link>http://www.jidesoft.com/blog/2007/08/27/displaying-validation-error/</link>
	<description>Love being a Swing developer</description>
	<pubDate>Tue, 06 Jan 2009 11:27:55 +0000</pubDate>
	<generator>http://wordpress.org/?v=2.7</generator>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
		<item>
		<title>By: David Qiao</title>
		<link>http://www.jidesoft.com/blog/2007/08/27/displaying-validation-error/comment-page-1/#comment-1891</link>
		<dc:creator>David Qiao</dc:creator>
		<pubDate>Tue, 28 Aug 2007 16:08:28 +0000</pubDate>
		<guid isPermaLink="false">http://www.jidesoft.com/blog/2007/08/27/displaying-validation-error/#comment-1891</guid>
		<description>Ken, 

You proabably need to consider the overall layout. In most cases, you don't add extra pixels to top and bottom for small components like text field and radio button.

There is a also a trick I tried so that Overlayable doesn't increase the perferred size of the actual component to "cheat" the parent layout manager. I tried it but didn't get a good result.

The main problem with JLayerPane approach is it doesn't work well if the components are inside a scroll pane. That's why we didn't take that approach.</description>
		<content:encoded><![CDATA[<p>Ken, </p>
<p>You proabably need to consider the overall layout. In most cases, you don&#8217;t add extra pixels to top and bottom for small components like text field and radio button.</p>
<p>There is a also a trick I tried so that Overlayable doesn&#8217;t increase the perferred size of the actual component to &#8220;cheat&#8221; the parent layout manager. I tried it but didn&#8217;t get a good result.</p>
<p>The main problem with JLayerPane approach is it doesn&#8217;t work well if the components are inside a scroll pane. That&#8217;s why we didn&#8217;t take that approach.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Ken Orr</title>
		<link>http://www.jidesoft.com/blog/2007/08/27/displaying-validation-error/comment-page-1/#comment-1890</link>
		<dc:creator>Ken Orr</dc:creator>
		<pubDate>Tue, 28 Aug 2007 15:04:58 +0000</pubDate>
		<guid isPermaLink="false">http://www.jidesoft.com/blog/2007/08/27/displaying-validation-error/#comment-1890</guid>
		<description>Hey David,

This seems like a pretty good solution to the problem. There is still one wrinkle though. If you have a OverlayTextField with an overlay icon on the south west corner, hanging over by say 5 pixels on each side and are trying to align that text field with another non-validatable component, there will be alignment issues - namely, it will difficult to line up the edges of the 'main' components.

There may be a hybrid solution - a mix of the JLayeredPane concept (http://www.pushing-pixels.org/?p=99) combined with your work discussed here. You could extend JPanel (say OverlayableJPanel) which would have all the functionality of JPanel but would also allow the installation of overlay components on other components. This be a decent compromise to the pros and cons of each individual solution.

-Ken</description>
		<content:encoded><![CDATA[<p>Hey David,</p>
<p>This seems like a pretty good solution to the problem. There is still one wrinkle though. If you have a OverlayTextField with an overlay icon on the south west corner, hanging over by say 5 pixels on each side and are trying to align that text field with another non-validatable component, there will be alignment issues - namely, it will difficult to line up the edges of the &#8216;main&#8217; components.</p>
<p>There may be a hybrid solution - a mix of the JLayeredPane concept (http://www.pushing-pixels.org/?p=99) combined with your work discussed here. You could extend JPanel (say OverlayableJPanel) which would have all the functionality of JPanel but would also allow the installation of overlay components on other components. This be a decent compromise to the pros and cons of each individual solution.</p>
<p>-Ken</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: David Qiao</title>
		<link>http://www.jidesoft.com/blog/2007/08/27/displaying-validation-error/comment-page-1/#comment-1887</link>
		<dc:creator>David Qiao</dc:creator>
		<pubDate>Tue, 28 Aug 2007 07:12:33 +0000</pubDate>
		<guid isPermaLink="false">http://www.jidesoft.com/blog/2007/08/27/displaying-validation-error/#comment-1887</guid>
		<description>Hi Pavan,

Can you elaborate? I think overlayable provides more than just Z-ordering.

I tried using Z-ordering to get rid of the overridden repaint method but it doesn't work as I'd expect. If I don't override repaint method and use setComponentZOrder, the icon is still overwritten when the radio button repaints (i.e when roll over under Windows XP L&#038;F). Not sure if I used it incorrectly.</description>
		<content:encoded><![CDATA[<p>Hi Pavan,</p>
<p>Can you elaborate? I think overlayable provides more than just Z-ordering.</p>
<p>I tried using Z-ordering to get rid of the overridden repaint method but it doesn&#8217;t work as I&#8217;d expect. If I don&#8217;t override repaint method and use setComponentZOrder, the icon is still overwritten when the radio button repaints (i.e when roll over under Windows XP L&#038;F). Not sure if I used it incorrectly.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: pavan</title>
		<link>http://www.jidesoft.com/blog/2007/08/27/displaying-validation-error/comment-page-1/#comment-1886</link>
		<dc:creator>pavan</dc:creator>
		<pubDate>Tue, 28 Aug 2007 06:21:30 +0000</pubDate>
		<guid isPermaLink="false">http://www.jidesoft.com/blog/2007/08/27/displaying-validation-error/#comment-1886</guid>
		<description>Won't it be easier to do the same thing using JComponent  ZOrdering ?</description>
		<content:encoded><![CDATA[<p>Won&#8217;t it be easier to do the same thing using JComponent  ZOrdering ?</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Andres Almiray</title>
		<link>http://www.jidesoft.com/blog/2007/08/27/displaying-validation-error/comment-page-1/#comment-1884</link>
		<dc:creator>Andres Almiray</dc:creator>
		<pubDate>Tue, 28 Aug 2007 00:48:20 +0000</pubDate>
		<guid isPermaLink="false">http://www.jidesoft.com/blog/2007/08/27/displaying-validation-error/#comment-1884</guid>
		<description>These are great news! I'll be sure to add support for overlays in JideBuilder. By the way, thanks for making JCL open source =)</description>
		<content:encoded><![CDATA[<p>These are great news! I&#8217;ll be sure to add support for overlays in JideBuilder. By the way, thanks for making JCL open source =)</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: David Qiao</title>
		<link>http://www.jidesoft.com/blog/2007/08/27/displaying-validation-error/comment-page-1/#comment-1883</link>
		<dc:creator>David Qiao</dc:creator>
		<pubDate>Mon, 27 Aug 2007 21:26:48 +0000</pubDate>
		<guid isPermaLink="false">http://www.jidesoft.com/blog/2007/08/27/displaying-validation-error/#comment-1883</guid>
		<description>Totally agree. We are just trying to find a solution that is "good enough" for most general usages. Please run http://www.jidesoft.com/products/1.4/jide_demo.jnlp and open "Overlayable Demo" to see it in action. The source code of the demo can be viewed by clicking on the "Browse Source Code" button. Please let me know what you think (UI and API) as you are already the expert on this topic ;-)</description>
		<content:encoded><![CDATA[<p>Totally agree. We are just trying to find a solution that is &#8220;good enough&#8221; for most general usages. Please run <a href="http://www.jidesoft.com/products/1.4/jide_demo.jnlp" rel="nofollow">http://www.jidesoft.com/products/1.4/jide_demo.jnlp</a> and open &#8220;Overlayable Demo&#8221; to see it in action. The source code of the demo can be viewed by clicking on the &#8220;Browse Source Code&#8221; button. Please let me know what you think (UI and API) as you are already the expert on this topic <img src='http://www.jidesoft.com/blog/wp-includes/images/smilies/icon_wink.gif' alt=';-)' class='wp-smiley' /> </p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Kirill Grouchnikov</title>
		<link>http://www.jidesoft.com/blog/2007/08/27/displaying-validation-error/comment-page-1/#comment-1882</link>
		<dc:creator>Kirill Grouchnikov</dc:creator>
		<pubDate>Mon, 27 Aug 2007 21:17:44 +0000</pubDate>
		<guid isPermaLink="false">http://www.jidesoft.com/blog/2007/08/27/displaying-validation-error/#comment-1882</guid>
		<description>David,
To reach a conclusion you need to start with a set of requirements. The validation overlay example that was used in that series was chosen to illustrate the different general techniques. Like you're saying here, there is no "best general" solution, there is only "best for my needs" solution.
Thanks
Kirill</description>
		<content:encoded><![CDATA[<p>David,<br />
To reach a conclusion you need to start with a set of requirements. The validation overlay example that was used in that series was chosen to illustrate the different general techniques. Like you&#8217;re saying here, there is no &#8220;best general&#8221; solution, there is only &#8220;best for my needs&#8221; solution.<br />
Thanks<br />
Kirill</p>
]]></content:encoded>
	</item>
</channel>
</rss>
