This week's book giveaway is in the Servlets forum.
We're giving away four copies of Murach's Java Servlets and JSP and have Joel Murach on-line!
See this thread for details.
The moose likes Swing / AWT / SWT and the fly likes Graphics2D Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login

Win a copy of Murach's Java Servlets and JSP this week in the Servlets forum!
JavaRanch » Java Forums » Java » Swing / AWT / SWT
Bookmark "Graphics2D" Watch "Graphics2D" New topic


pride Jimmy

Joined: May 05, 2003
Posts: 5
How can I get the instance of Graphics2D?(exclude passed as parameters)
Thanks for any answer!
Joe Ess

Joined: Oct 29, 2001
Posts: 8836

In Java 2, the Graphics object passed to a Component's paint method is actually a Graphics2D instance. Cast it.

"blabbing like a narcissistic fool with a superiority complex" ~ N.A.
[How To Ask Questions On JavaRanch]
Consider Paul's rocket mass heater.
subject: Graphics2D
Similar Threads
Wrinting a string vertically
Graphics2D - Abstract?!
In (Graphics g) g an object of Graphics2D?
Graphics - Swing or 2D What's best
inconvertible type error