Hi, ppl, here's my problem. I want to be able to display my function using Java Swing. I tried using JLabel and passing in the method, but that doesn't work.
Eg: JLabel label=new JLabel(dog.makeSound);
so makeSound could be like:
public void makeSound()
This isn't my actual program, but I just want to know HOW to call a function to be used with Java Swing. Please help ppl! Thanks.