Noson1459 wrote...
this isn't my own subclass

import greenfoot.World; import javax.swing.JButton; /** * Write a description of class Frame here. * * @author Yehuda (1/2 of Nosson1459 - greenfoot.org user name) * @version 2/22/2017 */ public class Frame extends World { JButton button = new JButton(); /** * Constructor for objects of class Frame. * */ public Frame() { // Create a new world with 600x400 cells with a cell size of 1x1 pixels. super(600, 400, 1); button.act(); } }
java.lang.NoSuchMethodError: javax.swing.JButton.act()V at Frame.<init>(Frame.java:22) at sun.reflect.NativeConstructorAccessorImpl.newInstance0(Native Method) at sun.reflect.NativeConstructorAccessorImpl.newInstance(NativeConstructorAccessorImpl.java:62) at sun.reflect.DelegatingConstructorAccessorImpl.newInstance(DelegatingConstructorAccessorImpl.java:45) at java.lang.reflect.Constructor.newInstance(Constructor.java:422) at greenfoot.export.GreenfootScenarioViewer.instantiateNewWorld(GreenfootScenarioViewer.java:356) at greenfoot.export.GreenfootScenarioViewer.init(GreenfootScenarioViewer.java:212) at greenfoot.export.GreenfootScenarioMain.main(GreenfootScenarioMain.java:100)
import javax.swing.JButton;
import javax.swing.JButton;