Displaying detected faces on a JPanel
问题 I am working on a project for detecting faces from an input image. I am using opencv with Java. The problem which I'm facing is as below The faces that are detected are to be placed on a JLabel s setIcon method. First time it places the faces, but for the next image, the previous faces are not cleared. Following code that I tried to add and remove faces 1) Adding faces: jFaceLabel is JLabel array initialized to size 100 jpDetectedImage is a JPanel which contains the JLabels (faces) jFaceLabel