Using JavaCV lib its possible to draw the BufferedImage in JPanel with class Graphics without using IplImages.
Here is an example that display images from webcam in JPanel inside JFrame.
try {
OpenCVFrameGrabber camera = new OpenCVFrameGrabber(0);
OpenCVFrameConverter.ToMat converter = new OpenCVFrameConverter.ToMat();
Java2DFrameConverter converterBuffered = new Java2DFrameConverter();
Frame capturedFrame = null;
Mat matImage = null;
camera.start();
while ((capturedFrame = camera.grab()) != null) {
matImage = converter.convertToMat(capturedFrame);
BufferedImage bufferedImage = converterBuffered.convert(capturedFrame);
Graphics g = imageView.getGraphics(); //getting the Graphics Class of the JPanel named as imageView
g.drawImage(bufferedImage, 10,10, bufferedImage.getWidth(), bufferedImage.getHeight(),imageView); //this imageView is a JPanel component
}
camera.stop();
} catch (FrameGrabber.Exception ex) {
System.out.println("Fail to capture frame");
//this catch clause refer to errors on opening the camera or failure on capture of frame.
}