private Graphics2D g; g = (Graphics2D) getGraphics(); 转载于:https://www.cnblogs.com/klps/p/6256720.html