-----BEGIN PGP SIGNED MESSAGE----- Hash: SHA1 Hi. I have a question/suggestion to this piece of code:
> protected void paintComponent(Graphics g) > { > if (ui != null) > - ui.update(g, this); > + { > + Graphics g2 = g; > + if (!(g instanceof Graphics2D)) > + g2 = g.create(); > + ui.update(getComponentGraphics(g2), this); > + if (!(g instanceof Graphics2D)) > + g2.dispose(); > + } > } > You said the reason for creating the new Graphics2D object is to preserve the state of g. However I find the solution inappropriate. The "right way" of doing this would IMHO be using getTransform() (and setTransform() afterwards). Btw: In the future all Graphics instances will silently be Graphics2D instances (just as they are in the reference implementation since >= 1.2). A comment that explains this for future changes would be nice. cu Robert -----BEGIN PGP SIGNATURE----- Version: GnuPG v1.4.1 (GNU/Linux) Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org iD8DBQFCwyEPG9cfwmwwEtoRAgnLAJ9fvRdZruoGOZaDEyIEmEboLU7fmgCggW0C tTxR9cci9n0XXASBLWIVzxU= =GDId -----END PGP SIGNATURE----- _______________________________________________ Classpath-patches mailing list Classpath-patches@gnu.org http://lists.gnu.org/mailman/listinfo/classpath-patches