I have different packages in my Greenfoot scenario directory file. How can I access the other .java files from those directories in my scenario?
I took java.awt.Component and I made it extend greenfoot.Actor but when I do "Actor button = new javax.swing.JButton("Test Button");" (I also opened java.awt.Container, javax.swing.JComponent, javax.swing.AbstractButton, and javax.swing.JButton) it says "Exception in thread "main" java.lang.VerifyError: Bad type on operand stack
Type 'javax/swing/JButton' (current frame, stack) is not assignable to 'greenfoot/Actor'". Why isn't it assignable if greenfoot.Actor is a great-great-great-great-grandfather of JButton?
It could be because that's not the JButton I'm accessing when I do "= new JButton", which is why I'm asking: How do I access those other package(s)/folders in my Greenfoot scenario? As of now I just used "import javax.swing.JButton;", but I don't know if that's how I'm supposed to do it, or maybe it is accessing those .java files but the problem lies in doing "Actor button = new javax.swing.JButton("Test Button");". (JButton is in a folder called swing which is in a folder called javax in my program directory. Also in that folder is AbstractButton and JComponent.)
All the methods from java.awt.Component to javax.swing.JButton are unrecognizable. I got the following error when I tried using addObject on "javax.swing.JButton button = new javax.swing.JButton("Test Button");": "Exception in thread "main" java.lang.VerifyError: Bad type on operand stack
Type 'javax/swing/JButton' (current frame, stack) is not assignable to 'greenfoot/Actor'".

