This morning I tried to compile my code but a got the error message: "cannot find symbol - method mouseClicked(Credits)"
I did nothing to change that I have no idea why it is not working, here is my code:
Last night on my mac I enabled the tap to click option and this morning when I tried to compile I did get an error from the terminal. I looked it up on google and found the problem was relating to the mac mouse pad , I thought that maybe the sudden change to tap to click was the problem so I quickly reverted my mouse pad options. That error no longer pops up in the terminal but still my code won't compile. I think my code is permanently broke because of that tap to click option, can anyone verify this?
This issue is in every class that has that method in it.
import greenfoot.*; // (World, Actor, GreenfootImage, Greenfoot and MouseInfo)
import java.awt.*;
/**
* Write a description of class Credits here.
*
* @author (your name)
* @version (a version number or a date)
*/
public class Credits extends Actor
{
/**
* Act - do whatever the Credits wants to do. This method is called whenever
* the 'Act' or 'Run' button gets pressed in the environment.
*/
public Credits() {
GreenfootImage image = new GreenfootImage(250,28);
Color fontColor = Color.BLACK;
Font font = new Font("Arial Black", Font.PLAIN, 30);
image.setFont(font);
image.drawString("Credits",8,24);
this.setImage(image);
}
public void act()
{
firstCredits();
}
public void firstCredits()
{
if (Greenfoot.mouseClicked(this))
{
startCredits1();
getWorld().removeObjects(getWorld().getObjects(Easy.class));
getWorld().removeObjects(getWorld().getObjects(EasyText.class));
getWorld().removeObjects(getWorld().getObjects(Hard.class));
getWorld().removeObjects(getWorld().getObjects(HardText.class));
getWorld().removeObjects(getWorld().getObjects(Medium.class));
getWorld().removeObjects(getWorld().getObjects(MediumText.class));
getWorld().removeObjects(getWorld().getObjects(Credits.class));
}
}
public void startCredits1()
{
/**
* I have not added anything for this yet, I tried to remove this already it does not fix it.
*/
}
}
