• Post Reply Bookmark Topic Watch Topic
  • New Topic

override paintComponent in JFrame  RSS feed

 
Chris Dancy
Ranch Hand
Posts: 136
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
So like the subject sais... The general idea is to set the JFrame as undecorated and build a custom JFrame. So the undecorated is easy yet when I over ride paint Component and attempt to draw a round rectangle nothing shows up? Is there something I'm missing? is there a proper way to over ride paintComponent for JFrame's that I'm missing?

Sincerely,
Chris Dancy
 
Michael Dunn
Ranch Hand
Posts: 4632
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
> is there a proper way to over ride paintComponent for JFrame's that I'm missing?

don't bother with JFrame.

do all your graphics on a JPanel, overriding paintComponent(),
then add your graphics panel to the frame (or to a JDialog, or to a JApplet)
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!