java - applet to Jframe -
I have followed the tutorial of Kilboult to make a game () then changed it. I used an applet but now I want to convert it to Jeffrey.
What I did: 1- I imported and raised Jeffram instead of the applet. 2- I has changed an init method to a constructor and added I have copied this code from somewhere and I do not know what it does. I would probably use it instead: What I could not do: They change something: (my first priority now) and GetImage and GetDocumentBase give me the "Undefined error" for AltMain type. How can I fix them? Are there any jeframes for them? Since then I can not run the program. I'm not sure if something else is necessary should I do something else? { How do I want to connect them The code is too long so I have posted a summary so far. I can write more code if needed. Any help would be appreciated. thank you in advanced. You need to understand that what the function does instead of copying and pasting them only does the best for. But the main idea is: An applet (which uses a japplete) has many functions which are automatically called. An application (which uses the xfram) is the main () method only as an entry point, it does not automatically call any other function for you, so if you have existing There are functions (Japlet Function), you have to call them by main () method.
public static zero main (string [] args) {// thread-security Use the Event Dispatch Thread to create UI for SwingUtilities.invokeLater {New Runnables} {@Override Public Zero Run () {New AltMain (); // AltMain is the name of my main square.}}); }
public static zero main (string [] args) {new AltMain ();
base = getDocumentBase ();
bg = getImage (base, "data / bg space.jpg");
Comments
Post a Comment