Win a copy of Head First Agile this week in the Agile forum!
  • Post Reply Bookmark Topic Watch Topic
  • New Topic

JInternalFrames: sharing a graphics context  RSS feed

Marie Henry
Posts: 2
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
I am currently developing an application that uses many internal frames. On one of the frames, the user can draw shapes on by clicking on it (Sort of like a draw/paint program). However, when I switch back and forth between this internal frame and another one, the drawn shapes (drawn by using GeneralPath) appear to "jump" to a new location. I know that when you select a JInternalFrame it calls a repaint of the last selected one and then the newly selected one. I'm thinking it must somehow be confusing graphics and bounds. I'm figuring that the graphics context is being shared between all the frames since the object is sometimes drawn completely off the frame it should be on. Has anyone encountered this behavior before? Any suggestions?

Thanks is advance,
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!