I'd think it could be done like this:
Graphics g = getGraphics(); // No need to get this each time you render. Get it once outside the render function
private void render() {
layerManager.setViewWindow(0, 0, getWidth(), getHeight());
layerManager.paint(g, 0, 0);
// Loop through the vector
for (Enumeration en = gunshotVector.elements(); en.hasMoreElements();) {
((Sprite)en).paint(g);
}
flushGraphics();
}