your main problem is there is you are defining your own update() method. The update method of Component class is update(Graphics g)
Panel is ok as far as I know but Canvas is perhaps used more often.
I believe this is all you really need:
The component should get painted automatically. If you do need a constructor this is probably all it needs to be:
public picSegArray() {
repaint();
}
super() is automatically called.
repaint() calls update(Graphics g), supplying the Graphics object. update(Graphics g) clears the component then calls paint(Graphics g)
I dont think you need a constructor but I wanted to explain about super() and repaint()
------------------
Dont blindly believe everything I say.