Hi,

I have some class like this.

class MyJPanel extends JPanel { 

        public void paintComponent(Graphics g ) {

                super.paintComponent();

                // do my own stuff here

        }
}

This  MyJPanel   is then added to a JFrame window.

Now when I call super.paintComponent(); it clears all my window. Now I am drawing 
quite complex real time waveform ( It is VERY similar to real time waveform of heart ) 
and I change one or two pixels each time. I cannot afford to clear everything and draw 
everything with slight change again and again.

So is there a way to  NOT use super.paintComponent(); as the first line in my own 
paintComponent nethod ?


Second question is :

I am making calls to repaint() method repeatedly ( say once every 100 microseconds or 
faster )   and I am not using super.paintComponent(); as my first line and strangly I 
find that for no apparent reason some calls to my repaint() are just not getting 
executed. So all of a sudden one or two marker is missing from the screen. What could 
be the reason behind this ?


Will XOR (setXORMode) help ?  (Instead of Double Buffering) 

Thank you. 


Siddharth.



_______________________________________________
Advanced-swing mailing list
[EMAIL PROTECTED]
http://eos.dk/mailman/listinfo/advanced-swing

Reply via email to