Please note that new user registrations disabled at this time.

The Succeeder Stronghold

Anything goes... just keep it clean.
User avatar
dj_venom
Posts: 4416
Joined: Mon Sep 27, 2004 7:00 am
Location: The biggest island in the world
Contact:

Post by dj_venom »

A new file that uses which code? Your HTML one or the pdf one? And new file as in what type of file?

Sorry if I'm asking heaps of questions, but this is flying over my head.
In memorian: Fiona; Ravager; Lestat; Phreddie; and all of those from the 1500 incident. Lest we forget.
User avatar
Greg.
Posts: 1938
Joined: Sun Oct 31, 2004 3:56 pm
Location: Here, now
Contact:

Post by Greg. »

I'm probably going to change my name at some point... And maybe get an avatar... Not sure though...
User avatar
Ravager
Posts: 22464
Joined: Mon Jun 27, 2005 1:50 pm

Post by Ravager »

You can't change your name...well, not unless you ask Buck, so it's not too easy. An avatar is a good idea though. :)
[QUOTE=dj_venom]A new file that uses which code? Your HTML one or the pdf one? And new file as in what type of file?

Sorry if I'm asking heaps of questions, but this is flying over my head.[/QUOTE]
No, it's fine...just make a completely new, separate file in Notepad, copy in the html stuff...
<HTML>
<APPLET code="NewApplet.class" WIDTH = 300 HEIGHT = 200 ></APPLET>
</HTML>
Then save the file with the .html extension, save it in the same folder as the java files and open it.
User avatar
dj_venom
Posts: 4416
Joined: Mon Sep 27, 2004 7:00 am
Location: The biggest island in the world
Contact:

Post by dj_venom »

Okay, got that. But where do I put all that applet code?

In which bracket does it fit into?
In memorian: Fiona; Ravager; Lestat; Phreddie; and all of those from the 1500 incident. Lest we forget.
User avatar
Ravager
Posts: 22464
Joined: Mon Jun 27, 2005 1:50 pm

Post by Ravager »

Well, just save that stuff as an ordinary java file.

Getting the applet java file and the other java file you have working together may be a little trickier but focus on getting the applet to work first.
User avatar
Greg.
Posts: 1938
Joined: Sun Oct 31, 2004 3:56 pm
Location: Here, now
Contact:

Post by Greg. »

[QUOTE=Ravager]You can't change your name...well, not unless you ask Buck, so it's not too easy. An avatar is a good idea though. :)
[/QUOTE]

Juni changed hers...

I have no I dea about avatars/signatures... :mad:
User avatar
dj_venom
Posts: 4416
Joined: Mon Sep 27, 2004 7:00 am
Location: The biggest island in the world
Contact:

Post by dj_venom »

Hey Greg, sorry to have been ignoring, but busy here.

Yeah, people have changed (Fas to CM; Hill1 to Hill-Shatar etc.), but it's just a bit of work for Buck. You can always ask though, but he may not always grant it, and grant it immediately.

Rav, alright, I'll give it a try and see what I can do.
In memorian: Fiona; Ravager; Lestat; Phreddie; and all of those from the 1500 incident. Lest we forget.
User avatar
Ravager
Posts: 22464
Joined: Mon Jun 27, 2005 1:50 pm

Post by Ravager »

[QUOTE=GregtheSleeper]Juni changed hers...[/QUOTE]
Yeah, she had to PM Buck too...just like Hill did back when he was hill1. Still, it's not that common for people to change their names here.
Just like DJV beat me to saying. :p

[QUOTE=GregtheSleeper]I have no I dea about avatars/signatures... :mad: [/QUOTE]
Oh, you'll find something, it's not like it has to be incredibly significant or anything, just a picture you like for the avtar (and fits with the rules obviously).
User avatar
dj_venom
Posts: 4416
Joined: Mon Sep 27, 2004 7:00 am
Location: The biggest island in the world
Contact:

Post by dj_venom »

And if you're good with animation, you can make your own avatars, like I make mine :) .

So Rav, I'll put it in a new java file, but where in it, as in, between which brackets?

Code: Select all

/*
 * Camelapplet.java
 *
 * Created on 6 May 2006, 21:22
 *
 * To change this template, choose Tools | Template Manager
 * and open the template in the editor.
 */

package camelgame;

/**
 *
 * @author Daniel
 */
public class Camelapplet {
    
    /** Creates a new instance of Camelapplet */
    public Camelapplet() {
    }
}
In memorian: Fiona; Ravager; Lestat; Phreddie; and all of those from the 1500 incident. Lest we forget.
User avatar
Ravager
Posts: 22464
Joined: Mon Jun 27, 2005 1:50 pm

Post by Ravager »

[QUOTE=dj_venom]And if you're good with animation, you can make your own avatars, like I make mine :) .[/QUOTE]

And like I made mine! :D

Code: Select all

/*
 * Camelapplet.java
 *
 * Created on 6 May 2006, 21:22
 *
 * To change this template, choose Tools | Template Manager
 * and open the template in the editor.
 */

package camelgame;

/**
 *
 * @author Daniel
 */
public class Camelapplet [b]extends Applet implements ActionListener[/b]{

}
Below the bold part, I think...I'm more used to writing the code myself than using NetBeans, it just mixes up the code. :o
User avatar
Greg.
Posts: 1938
Joined: Sun Oct 31, 2004 3:56 pm
Location: Here, now
Contact:

Post by Greg. »

Right...

I'm off...

See you later guys...

Thanks for the help
User avatar
Ravager
Posts: 22464
Joined: Mon Jun 27, 2005 1:50 pm

Post by Ravager »

Sure, talk to you later Greg. :)
User avatar
dj_venom
Posts: 4416
Joined: Mon Sep 27, 2004 7:00 am
Location: The biggest island in the world
Contact:

Post by dj_venom »

Seeya later Greg, look forward to your avatar :) .

Okay Rav, I did that, and I ended up with two errors:

Code: Select all

D:\Camelgame\src\camelgame\Camelapplet.java:17: illegal start of type
import java.applet.*
D:\Camelgame\src\camelgame\Camelapplet.java:21: <identifier> expected
public class CamelApplet extends Applet implements ActionListener
2 errors
BUILD FAILED (total time: 0 seconds)
In memorian: Fiona; Ravager; Lestat; Phreddie; and all of those from the 1500 incident. Lest we forget.
User avatar
Ravager
Posts: 22464
Joined: Mon Jun 27, 2005 1:50 pm

Post by Ravager »

Well, you need a semi-colon after the first one.

Not sure about the other one.
Did you copy all the code fom the sample to underneath that line?
User avatar
dj_venom
Posts: 4416
Joined: Mon Sep 27, 2004 7:00 am
Location: The biggest island in the world
Contact:

Post by dj_venom »

Yeah, I had copied exactly. Then I found that by deleting the semi-colon it removed heaps of problems. Here is it exactly:

Code: Select all

init:
deps-jar:
Compiling 1 source file to D:\Camelgame\build\classes
D:\Camelgame\src\camelgame\Camelapplet.java:17: illegal start of type
import java.applet.*;
D:\Camelgame\src\camelgame\Camelapplet.java:17: <identifier> expected
import java.applet.*;
D:\Camelgame\src\camelgame\Camelapplet.java:18: illegal start of type
import java.awt.*;
D:\Camelgame\src\camelgame\Camelapplet.java:18: <identifier> expected
import java.awt.*;
D:\Camelgame\src\camelgame\Camelapplet.java:19: illegal start of type
import java.awt.event.*;
D:\Camelgame\src\camelgame\Camelapplet.java:19: <identifier> expected
import java.awt.event.*;
D:\Camelgame\src\camelgame\Camelapplet.java:20: illegal start of type
import javax.swing.*;
D:\Camelgame\src\camelgame\Camelapplet.java:20: <identifier> expected
import javax.swing.*;
8 errors
BUILD FAILED (total time: 0 seconds)
In memorian: Fiona; Ravager; Lestat; Phreddie; and all of those from the 1500 incident. Lest we forget.
User avatar
Ravager
Posts: 22464
Joined: Mon Jun 27, 2005 1:50 pm

Post by Ravager »

Well, you can't go for the least errors, you know...you have to battle away at it, even if it goes from 1 to 20 errors after you fix one...

Where exactly did you put the import statements in the program? Above the public class line?
User avatar
dj_venom
Posts: 4416
Joined: Mon Sep 27, 2004 7:00 am
Location: The biggest island in the world
Contact:

Post by dj_venom »

Lol, I know. :rolleyes:

I went throught the main thing properly, and decoded all of it. But our teacher didn't teach us applets, so I have no idea what to do.

Anyway, here is the code:

Code: Select all

package camelgame;

/**
 *
 * @author Daniel
 */
public class Camelapplet extends Applet implements ActionListener{
import java.applet.*;
import java.awt.*;
import java.awt.event.*;
import javax.swing.*;
public class CamelApplet extends Applet implements ActionListener
{
private TextArea resultArea;
<etc. continues on from pdf>
In memorian: Fiona; Ravager; Lestat; Phreddie; and all of those from the 1500 incident. Lest we forget.
User avatar
Ravager
Posts: 22464
Joined: Mon Jun 27, 2005 1:50 pm

Post by Ravager »

Ahh, I see the problem. Take out the bold line.

Code: Select all

package camelgame;

/**
 *
 * @author Daniel
 */
[b]public class Camelapplet extends Applet implements ActionListener{[/b]
import java.applet.*;
import java.awt.*;
import java.awt.event.*;
import javax.swing.*;
public class CamelApplet extends Applet implements ActionListener
{
private TextArea resultArea;
<etc. continues on from pdf>
User avatar
dj_venom
Posts: 4416
Joined: Mon Sep 27, 2004 7:00 am
Location: The biggest island in the world
Contact:

Post by dj_venom »

Well that removed those errors, but it left us with two...

Code: Select all

init:
deps-jar:
Compiling 1 source file to D:\Camelgame\build\classes
D:\Camelgame\src\camelgame\Applet.java:20: class CamelApplet is public, should be declared in a file named CamelApplet.java
public class CamelApplet extends Applet implements ActionListener
D:\Camelgame\src\camelgame\Applet.java:20: cannot access camelgame.Applet
bad class file: D:\Camelgame\src\camelgame\Applet.java
file does not contain class camelgame.Applet
Please remove or make sure it appears in the correct subdirectory of the classpath.
public class CamelApplet extends Applet implements ActionListener
2 errors
The problem line being

Code: Select all

public class CamelApplet extends Applet implements ActionListener
In memorian: Fiona; Ravager; Lestat; Phreddie; and all of those from the 1500 incident. Lest we forget.
User avatar
Ravager
Posts: 22464
Joined: Mon Jun 27, 2005 1:50 pm

Post by Ravager »

Okay, make sure the java file is saved as CamelApplet and not something like NewApplet.
Use Save As, or whatever the NetBeans equivalent is.
That might fix both errors.
Locked