permaculture playing cards
The moose likes Swing / AWT / SWT and the fly likes traffic simulation Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login
JavaRanch » Java Forums » Java » Swing / AWT / SWT
Bookmark "traffic simulation" Watch "traffic simulation" New topic
Author

traffic simulation

shepherd chagwedera
Greenhorn

Joined: Mar 25, 2006
Posts: 1
hi there

I have a traffic simulation code that is producing a start:applet not initialized error each time i run it. Can u pliz have a look at my code and help me

this is the code

Michael Dunn
Ranch Hand

Joined: Jun 09, 2003
Posts: 4632
to compile, I changed
Graph graph
to JPanel graph

compiled/ran, error, opened java console which showed
NumberFormatException, line 574
which is this line
carnum = Integer.parseInt(getParameter("carnum"));

changed to a hard-coded value
carnum = Integer.parseInt("10");

and the applet started OK
Sujitha Gali
Greenhorn

Joined: Jan 25, 2015
Posts: 1
I have made the corrections that you mentioned above but
I am still getting an error as below:

panel = new GraphPanel(this);
Its showing
constructor GraphPanel in class project.GraphPanel cannot be applied to given types;
required:javax.swing.JPanel
found:project.Graph
reason:actual argument project.Graph cannot be converted to javax.swing.JPanel by method invocation conversion
Its asking to create constructor GraphPanel(project.Graph) in project.GraphPanel
How to solve this?
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: traffic simulation
 
It's not a secret anymore!