paintComponent not being called on my glasspane

here is some code for a glasspane that I have.

For some reason, it never hits the paintComponent.

My program does:

publicclass GlassPaneextends JPanel{

/** Creates a new instance of glassPane */

public GlassPane(){

}

publicvoid cashierAction(JPanel panel,int initialX,int initialY){

frame = (JFrame)SwingUtilities.getAncestorOfClass(JFrame.class, panel);

glass = (JPanel) frame.getGlassPane();

//glass.setLayout(null);

xPos = initialX;

yPos = initialY;

glass.setVisible(true);

cashierAnimation =true;

repaint();

}

publicvoid paintComponent(Graphics g){

Graphics2D g2d = (Graphics2D)g;

super.paintComponent(g);

if(cashierAnimation){

g2d.drawImage(this.dollarSign, xPos, yPos, 10, 10,null);

}

}

private JFrame frame;

private JPanel glass;

privateint xPos;

privateint yPos;

privateboolean cashierAnimation =false;

private ImageIcon dollarImg =new ImageIcon("Data/Icons/dollar.gif");

private Image dollarSign = dollarImg.getImage();

}

Any ideas why it is not running the paintComponent?

I am pretty new to glass panes, I have gotten them to work with buttons, and other items, but painting on them is driving me crazy.

[2542 byte] By [bradwalla] at [2007-10-2 7:23:04]
# 1
Forgot a segmant...when I said "My Program goes:"It should have this in it:GlassPane glassPane = new GlassPane();glassPane.cashierAction(this, 0, 5);That is called from my main Panel when I hit a specific button.
bradwalla at 2007-7-16 20:59:33 > top of Java-index,Desktop,Core GUI APIs...
# 2
The Swing tutorial on [url http://java.sun.com/docs/books/tutorial/uiswing/components/rootpane.html]How to Use Root Panes[/url] has a working example of a glass pane with an overriden paintComponent() method.
camickra at 2007-7-16 20:59:34 > top of Java-index,Desktop,Core GUI APIs...