• Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other Pie Elite all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Jeanne Boyarsky
  • Ron McLeod
  • Paul Clapham
  • Liutauras Vilda
Sheriffs:
  • paul wheaton
  • Rob Spoor
  • Devaka Cooray
Saloon Keepers:
  • Stephan van Hulst
  • Tim Holloway
  • Carey Brown
  • Frits Walraven
  • Tim Moores
Bartenders:
  • Mikalai Zaikin

override paintComponent in JFrame

 
Ranch Hand
Posts: 136
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • 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
 
Ranch Hand
Posts: 4632
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • 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)
reply
    Bookmark Topic Watch Topic
  • New Topic