Hello!
Just wondering where I need to extend JFrame to get this working...
//imports import javax.swing.JFrame; //main class public class mainClass extends JFrame { //class level variables private static final long serialVersionUID = 1L; double wX,wY,wW,wH; public static void main(String[] args) { /* * Main method calls and creates windows, sprite, etc. * Separate methods will be made to manage the calls * */ createWindow(0,0,800,400,"Workbed"); } //create window method static void createWindow(double wX,double wY,double wW,double wH,String windowTitle){ //window properties setTitle(windowTitle); setSize(wW,wH); setLocation(wX,wY); setVisible(true); setDefaultCloseOperation(EXIT_ON_CLOSE); //window arguments }
When I extend it from the mainClass, it comes up with errors in the createWindow method...
Thank you! Any other tips for this would be great!


LinkBack URL
About LinkBacks
Reply With Quote