Re: [JAVA2D] Null pointer when using paintComponent and html text in JButton

2008-07-16 Thread java2d
Thanks for the tip. I have added methods to check property changes to the size and text. I also read somewhere that I should not override the paintComponent method but that I should use the paint method instead. The clip is normally set in the paint method of JComponent. If I do that it also

Re: [JAVA2D] Null pointer when using paintComponent and html text in JButton

2008-07-16 Thread Dmitri Trembovetski
[EMAIL PROTECTED] wrote: Thanks for the tip. I have added methods to check property changes to the size and text. I also read somewhere that I should not override the paintComponent method but that I should use the paint method instead. The clip is normally set in the paint method of JComponent.

Re: [JAVA2D] Null pointer when using paintComponent and html text in JButton

2008-07-15 Thread Dmitri Trembovetski
[EMAIL PROTECTED] wrote: I have found a solution or work around for my own question. The exception is thrown in Rectangle.intersect(Rectangle r) that was called with a null parameter as a result of BoxView.paint getting a null pointer back from g.getClipBounds(). As a workaround I have

[JAVA2D] Null pointer when using paintComponent and html text in JButton

2008-07-04 Thread java2d
Hi, I am trying to use html text to the BlurJButton from thhsi example code. http://codeidol.com/java/swing/Basic-JComponents/Blur-Disabled-Components/ However, I get a null pointer when I use html text, using normal text causes no problems. Any help or hints would be welcome. Thanks. This is