[JAVA2D] Bad default D3D performance

2008-07-16 Thread java2d
I think this is the right place to put it? While playing with the JInternalFrame tutorial ( http://java.sun.com/docs/books/tutorial/uiswing/components/internalframe.html ) i noticed really really bad performance while dragging the frames. In the order of 1/2 updates per second. I searched

Re: [JAVA2D] Bad default D3D performance

2008-07-16 Thread java2d
Thanks for the report. This problem is most likely caused by this bug: http://bugs.sun.com/view_bug.do?bug_id=6635462 The OUTLINE drag mode in internal frames uses XOR, which causes this bad performance you see. Just don't use OUTLINE drag mode in your application. Thanks, Dmitri [Message

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 JButto

2008-07-16 Thread java2d
The tags you're looking for are [ code ] and [ /code ] but remove the spaces in the tags! Put that around your code and the forum software will pretty print it for you. Also, wherever you read which method to override for JComponent is wrong. You should be overriding paintComponent() in

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.

[JAVA2D] Taking advantage of printer's native resolution

2008-07-16 Thread java2d
Since I have not received an answer to my previous question, I will try to simplify it even further. For an arbitrary printer, how can I print a single line that is one printer dot wide by N dots long, ie, print the finest line the printer is capable of printing? For a 300dpi printer this

[JAVA2D] I see that FullScreen Exclusive Mode has changed....

2008-07-16 Thread java2d
Try one of my applets and go fullscreen: http://pancyl.com/ Press F1 to enter -- ESC to exit. When you enter, the border flashes blue and there is a little icon on the upper right that gives a floating announcement that this is a Java window. This is much, much better than the banner at the

Re: [JAVA2D] I see that FullScreen Exclusive Mode has changed....

2008-07-16 Thread Dmitri Trembovetski
Hello, [EMAIL PROTECTED] wrote: Try one of my applets and go fullscreen: http://pancyl.com/ Press F1 to enter -- ESC to exit. When you enter, the border flashes blue and there is a little icon on the upper right that gives a floating announcement that this is a Java window. This is

Re: [JAVA2D] Taking advantage of printer's native resolution

2008-07-16 Thread Phil Race
In the print() method look at the graphics transform and scale down accordingly. Eg if the printer is 360 dpi, then the transform will report a scale of (5,5) so you need to apply a user scale of 1/5, 1/5. Then a 1 pixel user space line will be 1 device pixel. FYI printers that say they