Frame and paint() trouble...

Hello again...

I am having trouble getting my paint method to show up on its respective frame. At first I was getting null pointer exceptions for graphics, but after I fixed that, it still isn't showing up.

StudFinderReaderFrame showImage =new StudFinderReaderFrame();

showImage.setVisible(true);

showImage.setVisible(false);

showImage.paint(createArray(filename), showImage.getGraphics());

showImage.setVisible(true);

publicvoid paint(DataArray dataArray, Graphics g){

super.paint(g);

w=0;

width /= (double)(dataArray.size() +1);

for(int i = 0; i<dataArray.size();i++,w+=width){

g.setColor(Color.WHITE);

if(dataArray.getDataArray()[i].getVoltage()>1.0){

g.setColor(Color.BLACK);

}

g.fillRect((int)w,0,(int)width,(int)height);

}

}

[1439 byte] By [kcj989a] at [2007-11-26 14:45:52]
# 1
Have a look at the [url http://www.ddj.com/dept/cpp/184403907?pgno=3]Java Animation Techniques[/url] article. It's a bit dated but still pertinent.
paternostroa at 2007-7-8 8:33:29 > top of Java-index,Java Essentials,New To Java...
# 2
I figured it out...i was calling the paint method!!
kcj989a at 2007-7-8 8:33:29 > top of Java-index,Java Essentials,New To Java...