阅读背景:

如何在Java中使用paintComponent来绘制多个东西,但是旋转一个?

来源:互联网 

I'm making a program in Java for my CS class. My teacher has little experience with graphics programing in Java so I've turned to you. I'm currently using the paintComponent method of my main panel to draw two things, one, a rectangle (my cannon, possibly replaced with a image later), and two, a .png file of a cannon ball. I use the Graphics g (which I convert to Graphics2D) to paint the cannon and Ball on to the screen. I then rotate, but, the cannon and ball rotate, not just the cannon. Any tips, suggestions, or helpful tutorials are greatly appreciated.I'm making a program in Java for my CS class. M




你的当前访问异常,请进行认证后继续阅读剩余内容。

分享到: