Hi, I have an applet where I am drawing stuff by overriding the paint() method, and have added a Canvas to the applet, which will take up the whole screen. This canvas seems to be being drawn after my paint()ing, and so my applet's paint()ed stuff is invisible. Any ideas on how to force the canvas to be drawn before my paint method on my applet?
Thanks.
Edit:
public void paint(Graphics g) {
super.paint(g);
if (DEBUG) {
g.setColor(Color.red);
g.drawString("Memory free: " + ((Runtime.getRuntime().freeMemory()
/ 1024) / 1024) + "MB", 5, 20);
g.drawString("Memory total: " + ((Runtime.getRuntime().totalMemory()
/ 1024) / 1024) + "MB", 5, 35);
g.drawString("Memory used: " + (((Runtime.getRuntime().totalMemory()
- Runtime.getRuntime().freeMemory()) / 1024) / 1024) + "MB", 5, 50);
}
}