![]() ![]() So you pass a School as first argument instead of a ChooserListener, and null as second argument. And you're calling it using School sch = School.get("SCIM") ĭepartmentChooser DepartmentCho = new DepartmentChooser(sch,null) It thus takes a ChooserListener as first argument, and a School as second argument. And indeed, the constructor is defined as public DepartmentChooser (ChooserListener callback, School s) I am having issues with the commented segment it is giving off this error: E:School stuffJavaAssign7Polk.java:60: error: method FindMax in class ScanArray cannot be applied to given types int highest findarray. That means you're not passing the right types to the DepartmentChooser constructor. The statement that prints the string First Java application cannot stand alone it is embedded within a class, as shown in Figure 1-4. The purpose of the program is to take the string entered in main and run it through the scrambleMessage () functions to change. Your problem is because in your method getNumAccidents (double smallest) you require a double as a parameter. I dont understand what it is saying is wrong. Public void valueChanged (ListSelectionEvent e)ĭepartment lister = departments Ĭonstructor DepartmentChooser in class DepartmentChooser can not be applied to given types When I try and compile this code it says: : error: method scrambleMessage in class main cannot be applied to given types scramble + scrambleMessage (input.charAt (i)). ![]() ![]() Settings.addMouseListener(mouseclicks) Try this instead: posts post new posts (jsonObject.getString ('title'), jsonObject.getString ('description'), jsonObject.getString ('Canonicalurl')) Another solution would be to create an additional constructor which requires no arguments. tSelectionMode(ListSelectionModel.SINGLE_SELECTION) You have a single constructor with 3 required arguments and you supplied none. String adding = new String įor (Iterator itr = x.iterator () itr.hasNext() )ĭepartments = (Department) itr.next () Public DepartmentChooser (ChooserListener callback, School s) Public class DepartmentChooser extends JPanel implements ListSelectionListener * Write a description of class DepartmentChooser here. Hope you can help me as the deadline is soon. The programme contains few classes, but i've attach some of them. Now the first error is "constructor DepartmentChooser in class DepartmentChooser can not be applied to given types"Īnd the second is "Registration is not an abstract and dose not override abstract method actionPerformed" I have been asked to create a programme for my university, the programme was going well until I got 2 errors, I have been trying to fix them for a while now, I read most of the posts in here but unfortunately they did not help me. ![]()
0 Comments
Leave a Reply. |
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |