Results 21 to 28 of 28
Thread: JFrame to Applet?
- 08-13-2011, 06:59 PM #21
The applet is starting up, but the problem is that this is the first time I'm doing this, if I do it myself I will have to re-write the entire code (I am "NOT" gonna get this to work myself). My problem is that I am alone in the dev-team for this game (That means no help) that is why I'm trying to get someone to do it for me the first time (That makes me to learn). When someone helps me, I learn. (I look at the code & I see how to do it also learn how I should do the next time.
- 08-13-2011, 07:04 PM #22
Well first, you are not changing the entire code. Second, I am a one man game design/programmer myself.
But your program is up and running as an Applet right? You said that the applet is starting up, so that makes me think that you had gotten it to work.
- 08-13-2011, 07:13 PM #23
The applet runs, but I give up. Can't get it to work. I would need someone to help me the first time. Then I'll go through the code. And I will learn. Please that's the best soulution.
Can't get it to work. I would need someone to help me the first time. Then I'll go through the code. And I will learn. Please that's the best soulution.\
- 08-13-2011, 07:24 PM #25
If the applet does not work, then it does not run. If you can put a game together, then surely you can figure out how to change your Java Application (that extends JFrame) to a Java Applet (that extends JApplet). The whole point of programming is to be able to figure out a problem and solve it. Your problem is a conversion from a Java Application to an Applet. DarrlyBerke gave you the steps to that conversion.
- 08-13-2011, 09:03 PM #26
You have a copyright game that you consider someone (not kammce, of course!) could find attractive enough to want to steal, and you can't follow the steps given, with the help of the tutorials linked, to convert an application to an applet? Tell me another
- 08-13-2011, 09:18 PM #27
I'll give it one more try, but first I have some questions.
1. I have a glass pane on my window, what do I do with it? Does it work on an applet?
2. My game is not extending the JFrame, I have created the JFrame separate in the code.
3. How do I set the layout on a JApplet, I'm a little confused.
4. I have a lot of methods in my game, not many classes. How do I do to keep methods, just keep 'em? Does it really work with "public void METHODNAME" in a JApplet?
- 08-14-2011, 02:38 AM #28
1) I believe your glass pane should work in both Applets and Applications because they are both apart of Java.Swing
2) From my experience, you will need to extend to JApplet and include the public void init(). Just add all of your components into the init() function. Use
Container content = getContentPane();
3) Again! UseJava Code:
Container content = getContentPane();Java Code:
lowLayout flow = new FlowLayout();
4) yeah, just keep 'em. They will still work. Java did not change, just how you deploy it.
I hope this helps!
- By Rekuta in forum Java AppletsReplies: 9Last Post: 05-16-2010, 03:31 AM
- By wayn in forum AWT / SwingReplies: 0Last Post: 03-10-2010, 10:54 AM
- By Bill89 in forum New To JavaReplies: 0Last Post: 12-09-2009, 02:05 PM
- By Arsenic in forum Java AppletsReplies: 3Last Post: 04-10-2009, 08:37 PM
- By baltimore in forum AWT / SwingReplies: 1Last Post: 08-06-2007, 03:24 AM