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