Question: Why an error is occured that the method show(Mat,String) is undefined in app.java file ,Even Ive already had show method in ImageViewer class which is
eclipse-workspace- File Edit Source Refactor Navigate Search Project Run Window Help D clonedemojava showfilejava appjava lmageViewerjava package sample.util, 3 import java.awt.BorderLayout: 4 import java.awt. Image: 5 import java.awt.Dimension: 6 import java.awt.image.BufferedImage: 7 import java.awt.image.DataBufferByte: 9 import javax.swing.ImageIcon: 10 import javax. swing.JFrame: 11 import javax.swing. JLabel: 2 import javax.swing. JScrollPane: 13 import javax.swing.windovconstants: 14 import javax.swing.UIManager: s inport javax.swing.UnsupportedLookAndFeelException 17 import org.opencv.core.Mat: 21 public class ImageViewer f 22 private JLabel imageview: 24 25 27 2- publie void show (Mat nevImage, String windowName) ( setsystemLookAndFeel) JFrame frame createJFrame (windowName) Image loadedImagetoBufferedImage (newImage) : imageview.setIcon (new ImageIcon (1oadedImage) f rane pack): t rane. set.LocationRelativeto (null): Eame. setvisible (true) i Problens Console terminated> app [Java Application)CProgram FilesyJavaire 1,8.0 161bin javaw.exe (7 s 2561 16-4058)
Step by Step Solution
There are 3 Steps involved in it
Get step-by-step solutions from verified subject matter experts
