I suppose my answer lies in a better understanding of paintComponent(graphics g); But, I'll ask it here just incase someone has a direction to point me in I would much appriciate it.
You see I have some images I want to update at different times. So I need a way of only calling to update certain images. I tried using a layeredPane and, just using another component. But, either way they seem to be called if I update the paint it looks somethign like this.
Code:bUttonLogic.need = false; JComponent game = new gameEngine(gameEngine.NEW_GAME); JComponent gme = new typeO(); gAme = game; machine.add(game); machine.add(gme, -1); machine.pack();
This code below some how still calls to update the overriden paintComponent in typeO class.
Thanks ahead of time.Code:machine.gAme.repaint();
_______UPDATE _______________
I am now trying to use printComponent for the other images seems rather inefficeint but, I'm still toying around with how the graphics class is called. I still don't quite understand how the graphics class is called/works.
I now realize that when I add two components one after another it jsut overrides the previous. I think.


Reply With Quote
Bookmarks