Basically I have a JApplet that tries to draw with the graphics (ie, g.drawOval(10,10,100,100) and also include JCompotents (ie. JButton). What happens is that the repaint can get really wacky.
Sometimes the graphics will draw over widgets or vis-versa. It's not reliable and leads to unpredictable behavior.
(Button also always be on top of those graphics)
I've played around with it trying to override or manually draw components, changing orders, etc, but think I'm missing something very fundamental here. Anyone have a template or the correct way to use both g.drawXXX and JCompotents?
Again, just follow what I recommended,
and it works:
Also, please check the Swing painting tutorials including the Basic Painting Tutorial and the Advanced Painting Tutorial.
For a great book on this and more, please look into buying Filthy Rich Clients by Chet Haase and Romain Guy. You won't regret the purchase! It's one of the best Java books that I own.