<?xml version='1.0' encoding='UTF-8'?><?xml-stylesheet href="http://www.blogger.com/styles/atom.css" type="text/css"?><feed xmlns='http://www.w3.org/2005/Atom' xmlns:openSearch='http://a9.com/-/spec/opensearchrss/1.0/' xmlns:georss='http://www.georss.org/georss'><id>tag:blogger.com,1999:blog-1604594366142210766</id><updated>2009-10-28T07:11:05.011-07:00</updated><title type='text'>Simple Java Tips</title><subtitle type='html'>Only Java Tips :)</subtitle><link rel='http://schemas.google.com/g/2005#feed' type='application/atom+xml' href='http://jajatips.blogspot.com/feeds/posts/default'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/1604594366142210766/posts/default'/><link rel='alternate' type='text/html' href='http://jajatips.blogspot.com/'/><link rel='hub' href='http://pubsubhubbub.appspot.com/'/><author><name>dimka</name><uri>http://www.blogger.com/profile/08664787622082725550</uri><email>dooman87@gmail.com</email></author><generator version='7.00' uri='http://www.blogger.com'>Blogger</generator><openSearch:totalResults>13</openSearch:totalResults><openSearch:startIndex>1</openSearch:startIndex><openSearch:itemsPerPage>25</openSearch:itemsPerPage><entry><id>tag:blogger.com,1999:blog-1604594366142210766.post-107485631046104807</id><published>2009-08-31T21:45:00.001-07:00</published><updated>2009-09-10T23:02:19.099-07:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='java'/><category scheme='http://www.blogger.com/atom/ns#' term='j2se'/><category scheme='http://www.blogger.com/atom/ns#' term='log4j'/><title type='text'>Write compressing rolling file appender for log4j</title><summary type='text'>Good day!

On the last week, we gave our software to support specialists. They installed the program to production servers. And over three thousand users began to work with it. At the on of that week, I didn't hear nothing about our product. This is good the good sign! :) But, we have one little problem, log file that wrote program had size little more 1Gb!!! This is not very good result :) </summary><link rel='replies' type='application/atom+xml' href='http://jajatips.blogspot.com/feeds/107485631046104807/comments/default' title='Комментарии к сообщению'/><link rel='replies' type='text/html' href='https://www.blogger.com/comment.g?blogID=1604594366142210766&amp;postID=107485631046104807' title='Комментарии: 0'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/1604594366142210766/posts/default/107485631046104807'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/1604594366142210766/posts/default/107485631046104807'/><link rel='alternate' type='text/html' href='http://jajatips.blogspot.com/2009/08/writing-compressing-file-appender-for.html' title='Write compressing rolling file appender for log4j'/><author><name>dimka</name><uri>http://www.blogger.com/profile/08664787622082725550</uri><email>dooman87@gmail.com</email><gd:extendedProperty xmlns:gd='http://schemas.google.com/g/2005' name='OpenSocialUserId' value='06674666386324701150'/></author><thr:total xmlns:thr='http://purl.org/syndication/thread/1.0'>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-1604594366142210766.post-7495982114018818675</id><published>2009-07-01T21:56:00.000-07:00</published><updated>2009-08-26T23:32:29.820-07:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='spring'/><category scheme='http://www.blogger.com/atom/ns#' term='jdbc'/><title type='text'>Increase perfomance for insert operations to database</title><summary type='text'>Hi all!In this post, I would like to tell about the way to optimize INSERT operation to database. In our project we use postgresql 8.3. I have big problems with speed on some operations. When I profiled the application, I find out that the biggest amount of time spent for JDBC operations. We getting data from external systems, and often we have more than 300000 inserts to table. For work with </summary><link rel='replies' type='application/atom+xml' href='http://jajatips.blogspot.com/feeds/7495982114018818675/comments/default' title='Комментарии к сообщению'/><link rel='replies' type='text/html' href='https://www.blogger.com/comment.g?blogID=1604594366142210766&amp;postID=7495982114018818675' title='Комментарии: 0'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/1604594366142210766/posts/default/7495982114018818675'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/1604594366142210766/posts/default/7495982114018818675'/><link rel='alternate' type='text/html' href='http://jajatips.blogspot.com/2009/07/increase-perfomance-for-insert.html' title='Increase perfomance for insert operations to database'/><author><name>dimka</name><uri>http://www.blogger.com/profile/08664787622082725550</uri><email>dooman87@gmail.com</email><gd:extendedProperty xmlns:gd='http://schemas.google.com/g/2005' name='OpenSocialUserId' value='06674666386324701150'/></author><thr:total xmlns:thr='http://purl.org/syndication/thread/1.0'>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-1604594366142210766.post-3904978901594057375</id><published>2009-04-21T21:03:00.000-07:00</published><updated>2009-04-27T22:58:19.821-07:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='j2se'/><category scheme='http://www.blogger.com/atom/ns#' term='swing'/><category scheme='http://www.blogger.com/atom/ns#' term='java6'/><category scheme='http://www.blogger.com/atom/ns#' term='awt'/><title type='text'>Create hyperlink with browsing support.</title><summary type='text'>Yesterday, one of my tasks was to display hyperlink to local file. When user clicks hyperlink, program have to open file in an associated application. Earlier I have been writing desktop applications on QT and I haven't had any problems. But it is not very simple in Java(Swing). First, I've created label and put html as text:JLabel label = new JLabel("&lt;html&gt;&lt;a href=\"someurl.com\"&gt;link&lt;/a&gt;");When</summary><link rel='replies' type='application/atom+xml' href='http://jajatips.blogspot.com/feeds/3904978901594057375/comments/default' title='Комментарии к сообщению'/><link rel='replies' type='text/html' href='https://www.blogger.com/comment.g?blogID=1604594366142210766&amp;postID=3904978901594057375' title='Комментарии: 0'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/1604594366142210766/posts/default/3904978901594057375'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/1604594366142210766/posts/default/3904978901594057375'/><link rel='alternate' type='text/html' href='http://jajatips.blogspot.com/2009/04/create-hyperlink-with-desktop.html' title='Create hyperlink with browsing support.'/><author><name>dimka</name><uri>http://www.blogger.com/profile/08664787622082725550</uri><email>dooman87@gmail.com</email><gd:extendedProperty xmlns:gd='http://schemas.google.com/g/2005' name='OpenSocialUserId' value='06674666386324701150'/></author><thr:total xmlns:thr='http://purl.org/syndication/thread/1.0'>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-1604594366142210766.post-5372149119435489405</id><published>2009-04-19T13:07:00.000-07:00</published><updated>2009-04-20T00:24:35.654-07:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='blogger'/><title type='text'>test syntax highlighter for blogger</title><summary type='text'>public class SimpleClass {  public SimpleClass() {    System.out.println("I'm a simple class!!!");  }}If you want the same highlighter in your blogger:1.Install widget from here: http://fazibear.googlepages.com/blogger.html2.Reading usage instruction(and do it:)) from here: http://code.google.com/p/syntaxhighlighter/wiki/UsageBig thanks to developers of syntaxhighlighter.</summary><link rel='replies' type='application/atom+xml' href='http://jajatips.blogspot.com/feeds/5372149119435489405/comments/default' title='Комментарии к сообщению'/><link rel='replies' type='text/html' href='https://www.blogger.com/comment.g?blogID=1604594366142210766&amp;postID=5372149119435489405' title='Комментарии: 0'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/1604594366142210766/posts/default/5372149119435489405'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/1604594366142210766/posts/default/5372149119435489405'/><link rel='alternate' type='text/html' href='http://jajatips.blogspot.com/2009/04/test-syntax-highlighter-for-blogger.html' title='test syntax highlighter for blogger'/><author><name>dimka</name><uri>http://www.blogger.com/profile/08664787622082725550</uri><email>dooman87@gmail.com</email><gd:extendedProperty xmlns:gd='http://schemas.google.com/g/2005' name='OpenSocialUserId' value='06674666386324701150'/></author><thr:total xmlns:thr='http://purl.org/syndication/thread/1.0'>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-1604594366142210766.post-7033598333187494880</id><published>2009-04-12T07:23:00.001-07:00</published><updated>2009-04-12T20:53:36.209-07:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='java'/><category scheme='http://www.blogger.com/atom/ns#' term='j2se'/><category scheme='http://www.blogger.com/atom/ns#' term='syntax'/><title type='text'>Using inner classes</title><summary type='text'>Hi all! In this post I want to tell you about inner classes. Very often, we create static inner classes that contains information about main class. For example: public class Person {    private String name;   private String occupation;   public static class PersonInfo {     private String info;     public PersonInfo(String name, String occupation) {       info = “His name is ” + name + “ . He is </summary><link rel='replies' type='application/atom+xml' href='http://jajatips.blogspot.com/feeds/7033598333187494880/comments/default' title='Комментарии к сообщению'/><link rel='replies' type='text/html' href='https://www.blogger.com/comment.g?blogID=1604594366142210766&amp;postID=7033598333187494880' title='Комментарии: 0'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/1604594366142210766/posts/default/7033598333187494880'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/1604594366142210766/posts/default/7033598333187494880'/><link rel='alternate' type='text/html' href='http://jajatips.blogspot.com/2009/04/using-inner-classes_6395.html' title='Using inner classes'/><author><name>dimka</name><uri>http://www.blogger.com/profile/08664787622082725550</uri><email>dooman87@gmail.com</email><gd:extendedProperty xmlns:gd='http://schemas.google.com/g/2005' name='OpenSocialUserId' value='06674666386324701150'/></author><thr:total xmlns:thr='http://purl.org/syndication/thread/1.0'>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-1604594366142210766.post-2122386378048134280</id><published>2009-01-18T07:05:00.000-08:00</published><updated>2009-01-18T07:18:56.387-08:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='jnlp'/><category scheme='http://www.blogger.com/atom/ns#' term='java'/><category scheme='http://www.blogger.com/atom/ns#' term='debug'/><title type='text'>Debug JNLP application</title><summary type='text'>Hi all!I want to remote debug in jnlp application. This problem solved is very simple. I set environment variable JAVAWS_VM_ARGS to value: -Xdebug -Xrunjdwp:transport=dt_socket,server=y,suspend=n,address=5006After this, I create new run point in Intelli J IDEA. Type of run point is Remote debug. In run point set set host=localhost and port=5006(or other, ports in JAVAWS_VM_ARGS and run point must</summary><link rel='replies' type='application/atom+xml' href='http://jajatips.blogspot.com/feeds/2122386378048134280/comments/default' title='Комментарии к сообщению'/><link rel='replies' type='text/html' href='https://www.blogger.com/comment.g?blogID=1604594366142210766&amp;postID=2122386378048134280' title='Комментарии: 0'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/1604594366142210766/posts/default/2122386378048134280'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/1604594366142210766/posts/default/2122386378048134280'/><link rel='alternate' type='text/html' href='http://jajatips.blogspot.com/2009/01/debug-jnlp-application.html' title='Debug JNLP application'/><author><name>dimka</name><uri>http://www.blogger.com/profile/08664787622082725550</uri><email>dooman87@gmail.com</email><gd:extendedProperty xmlns:gd='http://schemas.google.com/g/2005' name='OpenSocialUserId' value='06674666386324701150'/></author><thr:total xmlns:thr='http://purl.org/syndication/thread/1.0'>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-1604594366142210766.post-3683572519546228242</id><published>2008-12-13T06:42:00.001-08:00</published><updated>2008-12-16T01:03:03.762-08:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='active directory'/><category scheme='http://www.blogger.com/atom/ns#' term='websphere'/><category scheme='http://www.blogger.com/atom/ns#' term='j2ee'/><category scheme='http://www.blogger.com/atom/ns#' term='ldap'/><category scheme='http://www.blogger.com/atom/ns#' term='was'/><title type='text'>Global security in WAS 6.1over Active Directory</title><summary type='text'>We need security over Active Directory in our enterprise application wich works on WebSphere Application Server v 6.1.x. When we test our application we use OpenDS(https://opends.dev.java.net/) to emulate Active Directory. But we must replace OpenDS with Active Directory. Every LDAP server has specific parameters. For fast test, I use ldapsearch from OpenDS. I spent more then two hours to get </summary><link rel='replies' type='application/atom+xml' href='http://jajatips.blogspot.com/feeds/3683572519546228242/comments/default' title='Комментарии к сообщению'/><link rel='replies' type='text/html' href='https://www.blogger.com/comment.g?blogID=1604594366142210766&amp;postID=3683572519546228242' title='Комментарии: 0'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/1604594366142210766/posts/default/3683572519546228242'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/1604594366142210766/posts/default/3683572519546228242'/><link rel='alternate' type='text/html' href='http://jajatips.blogspot.com/2008/12/global-security-in-was-61over-active.html' title='Global security in WAS 6.1over Active Directory'/><author><name>dimka</name><uri>http://www.blogger.com/profile/08664787622082725550</uri><email>dooman87@gmail.com</email><gd:extendedProperty xmlns:gd='http://schemas.google.com/g/2005' name='OpenSocialUserId' value='06674666386324701150'/></author><thr:total xmlns:thr='http://purl.org/syndication/thread/1.0'>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-1604594366142210766.post-8453495860271159759</id><published>2008-12-05T22:55:00.000-08:00</published><updated>2008-12-05T23:03:19.466-08:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='svn'/><title type='text'>SVN: Update only new folders in working copy</title><summary type='text'>Hi all!For example, you have working copy that looks like this:foo/bar/And you know that someone added new folder, that called baz, in repository. You want get only this folder and you don't want to update all working copy. Solution is very simple:C:\project\&gt;svn update bazThat's all, now you have new folder in your working copy.P.S. You can't do this, using popular frontend for svn - TortoiseSVN.</summary><link rel='replies' type='application/atom+xml' href='http://jajatips.blogspot.com/feeds/8453495860271159759/comments/default' title='Комментарии к сообщению'/><link rel='replies' type='text/html' href='https://www.blogger.com/comment.g?blogID=1604594366142210766&amp;postID=8453495860271159759' title='Комментарии: 0'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/1604594366142210766/posts/default/8453495860271159759'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/1604594366142210766/posts/default/8453495860271159759'/><link rel='alternate' type='text/html' href='http://jajatips.blogspot.com/2008/12/svn-update-only-new-folders-in-working.html' title='SVN: Update only new folders in working copy'/><author><name>dimka</name><uri>http://www.blogger.com/profile/08664787622082725550</uri><email>dooman87@gmail.com</email><gd:extendedProperty xmlns:gd='http://schemas.google.com/g/2005' name='OpenSocialUserId' value='06674666386324701150'/></author><thr:total xmlns:thr='http://purl.org/syndication/thread/1.0'>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-1604594366142210766.post-98893948912522817</id><published>2008-11-20T03:35:00.001-08:00</published><updated>2008-11-20T03:43:57.527-08:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='placeholder'/><category scheme='http://www.blogger.com/atom/ns#' term='spring'/><title type='text'>Placeholder trick in Spring</title><summary type='text'> Hello everyone! In the Spring Framework (I use Spring 2.5), we can use  property placeholders in the spring xml-based configuration file. I wrote simple example that consist of four beans. Two of them are simple beans, one is a factory and one is a result bean that we want to get from factory bean. &lt;?xml version="1.0" encoding="UTF-8"?&gt; &lt;beans xmlns="http://www.springframework.org/schema/beans" </summary><link rel='replies' type='application/atom+xml' href='http://jajatips.blogspot.com/feeds/98893948912522817/comments/default' title='Комментарии к сообщению'/><link rel='replies' type='text/html' href='https://www.blogger.com/comment.g?blogID=1604594366142210766&amp;postID=98893948912522817' title='Комментарии: 2'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/1604594366142210766/posts/default/98893948912522817'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/1604594366142210766/posts/default/98893948912522817'/><link rel='alternate' type='text/html' href='http://jajatips.blogspot.com/2008/11/sring-placeholder-trick.html' title='Placeholder trick in Spring'/><author><name>dimka</name><uri>http://www.blogger.com/profile/08664787622082725550</uri><email>dooman87@gmail.com</email><gd:extendedProperty xmlns:gd='http://schemas.google.com/g/2005' name='OpenSocialUserId' value='06674666386324701150'/></author><thr:total xmlns:thr='http://purl.org/syndication/thread/1.0'>2</thr:total></entry><entry><id>tag:blogger.com,1999:blog-1604594366142210766.post-6672718184223726605</id><published>2008-11-05T22:23:00.001-08:00</published><updated>2009-09-10T23:39:27.161-07:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='channel'/><category scheme='http://www.blogger.com/atom/ns#' term='bytebuffer'/><category scheme='http://www.blogger.com/atom/ns#' term='j2se'/><category scheme='http://www.blogger.com/atom/ns#' term='inputstream'/><category scheme='http://www.blogger.com/atom/ns#' term='nio'/><title type='text'>Reading from InputStream</title><summary type='text'>Lately I've faced a simple problem: I needed to read all bytes from the InputStream. I didn't know type of the InputStream, so, I've spent more then two hours solving this problem without any success. I didn't want to read each byte from the stream. All evening I could think only about this problem. Solution turned to be very simple! I found a sample in the JDK installation directory($JAVA_HOME/</summary><link rel='replies' type='application/atom+xml' href='http://jajatips.blogspot.com/feeds/6672718184223726605/comments/default' title='Комментарии к сообщению'/><link rel='replies' type='text/html' href='https://www.blogger.com/comment.g?blogID=1604594366142210766&amp;postID=6672718184223726605' title='Комментарии: 0'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/1604594366142210766/posts/default/6672718184223726605'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/1604594366142210766/posts/default/6672718184223726605'/><link rel='alternate' type='text/html' href='http://jajatips.blogspot.com/2008/11/reading-from-inputstream.html' title='Reading from InputStream'/><author><name>dimka</name><uri>http://www.blogger.com/profile/08664787622082725550</uri><email>dooman87@gmail.com</email><gd:extendedProperty xmlns:gd='http://schemas.google.com/g/2005' name='OpenSocialUserId' value='06674666386324701150'/></author><thr:total xmlns:thr='http://purl.org/syndication/thread/1.0'>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-1604594366142210766.post-8633434480981224359</id><published>2008-10-06T21:48:00.000-07:00</published><updated>2009-08-31T21:42:23.022-07:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='reflection'/><category scheme='http://www.blogger.com/atom/ns#' term='java'/><category scheme='http://www.blogger.com/atom/ns#' term='j2se'/><title type='text'>Using reflections for test equals.</title><summary type='text'>Problem: test for equals two objects of the same class by all fields(deep equals).
For solve this problem I use reflection API from JDK. Package that store classes for reflection is java.lang.reflect. I wrote simple helper class with static methods.

You can find the complete realization at the and of the post.

First of all we should describe algorithm:
Input: two object that we need compare.
</summary><link rel='replies' type='application/atom+xml' href='http://jajatips.blogspot.com/feeds/8633434480981224359/comments/default' title='Комментарии к сообщению'/><link rel='replies' type='text/html' href='https://www.blogger.com/comment.g?blogID=1604594366142210766&amp;postID=8633434480981224359' title='Комментарии: 0'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/1604594366142210766/posts/default/8633434480981224359'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/1604594366142210766/posts/default/8633434480981224359'/><link rel='alternate' type='text/html' href='http://jajatips.blogspot.com/2008/10/using-reflections-for-test-equals.html' title='Using reflections for test equals.'/><author><name>dimka</name><uri>http://www.blogger.com/profile/08664787622082725550</uri><email>dooman87@gmail.com</email><gd:extendedProperty xmlns:gd='http://schemas.google.com/g/2005' name='OpenSocialUserId' value='06674666386324701150'/></author><thr:total xmlns:thr='http://purl.org/syndication/thread/1.0'>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-1604594366142210766.post-947118793233370379</id><published>2008-09-28T10:37:00.000-07:00</published><updated>2009-09-04T23:49:57.579-07:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='mysql'/><category scheme='http://www.blogger.com/atom/ns#' term='tomcat'/><category scheme='http://www.blogger.com/atom/ns#' term='jdbc'/><title type='text'>Connect to mysql 5 with Tomcat 6</title><summary type='text'>When I try to solve this problem I read two docs: help in Netbeans 6(http://www.netbeans.org/kb/60/web/mysql-webapp.html#settingUpConnPool) and jndi help from tomcat.apache.org(http://tomcat.apache.org/tomcat-6.0-doc/jndi-datasource-examples-howto.html). But when I lookup InitialContext, application throws NamingException. I spent over four hours to solve this problem. As I've understood, when I </summary><link rel='replies' type='application/atom+xml' href='http://jajatips.blogspot.com/feeds/947118793233370379/comments/default' title='Комментарии к сообщению'/><link rel='replies' type='text/html' href='https://www.blogger.com/comment.g?blogID=1604594366142210766&amp;postID=947118793233370379' title='Комментарии: 2'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/1604594366142210766/posts/default/947118793233370379'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/1604594366142210766/posts/default/947118793233370379'/><link rel='alternate' type='text/html' href='http://jajatips.blogspot.com/2008/09/connect-to-mysql-5-with-tomcat-6.html' title='Connect to mysql 5 with Tomcat 6'/><author><name>dimka</name><uri>http://www.blogger.com/profile/08664787622082725550</uri><email>dooman87@gmail.com</email><gd:extendedProperty xmlns:gd='http://schemas.google.com/g/2005' name='OpenSocialUserId' value='06674666386324701150'/></author><thr:total xmlns:thr='http://purl.org/syndication/thread/1.0'>2</thr:total></entry><entry><id>tag:blogger.com,1999:blog-1604594366142210766.post-3709643935122292828</id><published>2008-09-15T21:59:00.000-07:00</published><updated>2008-09-15T22:58:50.381-07:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='swing'/><category scheme='http://www.blogger.com/atom/ns#' term='jcomponent'/><title type='text'>Wrapper for JComponent</title><summary type='text'>Trouble: we have some JComponent. We need paint this component and remove all logic from it.At the begining, I think that solution is very simple: override paint() method, and draw inner component in wrpapper's Graphics.public class ComponentWrapper extends JComponent {    private JComponent innerComponent;    public ComponentWrapper(JComponent innerComponent) {            this.innerComponent = </summary><link rel='replies' type='application/atom+xml' href='http://jajatips.blogspot.com/feeds/3709643935122292828/comments/default' title='Комментарии к сообщению'/><link rel='replies' type='text/html' href='https://www.blogger.com/comment.g?blogID=1604594366142210766&amp;postID=3709643935122292828' title='Комментарии: 0'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/1604594366142210766/posts/default/3709643935122292828'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/1604594366142210766/posts/default/3709643935122292828'/><link rel='alternate' type='text/html' href='http://jajatips.blogspot.com/2008/09/wrapper-for-jcomponent.html' title='Wrapper for JComponent'/><author><name>dimka</name><uri>http://www.blogger.com/profile/08664787622082725550</uri><email>dooman87@gmail.com</email><gd:extendedProperty xmlns:gd='http://schemas.google.com/g/2005' name='OpenSocialUserId' value='06674666386324701150'/></author><thr:total xmlns:thr='http://purl.org/syndication/thread/1.0'>0</thr:total></entry></feed>