Graphics
Hi,
What is the difference between sun.java2d.SunGraphics2D and sun.awt.windows.WGraphics? A Panel is of type sun.awt.windows.WGraphics when i use JRE1.3.0. The same panel changes to type sun.java2d.SunGraphics2D when i use JRE1.4.2.
Should we include some dlls in JRE\bin or JRE\lib to convert it into sun.awt.windows.WGraphics type?
Kindly help.
Regards,
Arun
[399 byte] By [
@@Dark@@a] at [2007-11-26 21:38:31]

No, you don't care what the difference is. Thats why you use the Graphics class or the 2DGraphics class as your graphics object. You don't care about the actual implementation. The JRE will has the appropriate classes in the runtime.
I have a calendar control. When i click on a date, I should repaint it.
I debugged the flow. When I use JRe 1.3.0, repaint calls paint() with graphics type(i gave g.toString) sun.awt.windows.WGraphics whereas when i use JRE 1.4.2, repaint calls paint() with graphics type sun.java2d.SunGraphics2D. Fomer case, whatever date i selected is displayed. But latter case, the default date is displayed. I think repaint is not happening correctly. Can you comment on it?