I have a class file to handle the GUI which is SampleGUI.class. I want to use that into my java project. I have created a folder named ClassFiles in root directory. I put the SampleGUI.class inside that folder. I went to project properties ->Libraries->Add Class Folder. Then i tried to call that class inside my new class created inside the project like
new SampleGUI ( length, width) ;. But it gives me the error “SampleGUI cannot be resolved to a type”. Do i need to import anything? How do i procees with this situation?
If SampleGUI is in a different package, you’ll need to import it.
e.g.
where ClassFiles is the package name.
If SampleGUI is your own, and you have the .java source file, you can add SampleGUI to the ClassFiles package, if it isn’t already, by adding the following line to the top of SampleGUI: