In java applet I am plotting chart By JCChart. Now after plotting the chart when I watch the task scheduler then it show that cpu utilization is still greater then 50 by Java.exe. Now I use JConsole with plugin to watch which thread in java taking the much CPU utilization. Then it shows that AWT-EventQueue-2 is taking major time And this thread is in Runnable state and never starts. and what it doing is that some like below..
sun.java2d.loops.FillRect.FillRect(Native Method) sun.java2d.pipe.LoopPipe.fillRect(Unknown Source) sun.java2d.pipe.ValidatePipe.fillRect(Unknown Source) sun.java2d.SunGraphics2D.fillRect(Unknown Source) com.klg.jclass.chart.JCChart.paintComponent(JCChart.java:670) javax.swing.JComponent.paint(Unknown Source) com.klg.jclass.chart.JCChart.paint(JCChart.java:593) javax.swing.JComponent.paintChildren(Unknown Source) javax.swing.JComponent.paint(Unknown Source)
So can any body tell me how can I prevent my applet from such type of happening or how can I stop this.