Hello
I am a student of computer science year 3 and am doing my project on a road design simulator. I should be able to design a road on a java interface and simulate it with cars. Does anyone have an idea about how should i proceed with it?
Hameeda0410
0
Newbie Poster
Recommended Answers
Jump to PostIt is also important to know exactly what you want to simulate. When you say "road design" it makes me think you are talking about traffic flow, meaning that if you give the simulator a map of roads including road signs and the number of lanes for each road, and …
Jump to PostYes, lots of ideas, but your requirement is still far to vague for anyone to give a proper reply. What kind of simulation do you need for the cars? In how much detail (see previous posts)?
(In 1971/2 I worked on an IBM project to simulate the traffic flow in …
Jump to PostYou can do your basic drawing by extending JPanel with a custom paintComponent that draws the roads according to a model that defines their number oflanes, start & end copordinates etc, and draws the cars according to a car model that defines where the cars are and which way they …
Jump to PostBecause you are missing
public void paintComponent(Graphics g)
method inside your JPanel class? No paint, no display. You should reread what James said. You could search on Google for a sample graphic 2D …
All 14 Replies
DavidKroukamp
105
Master Poster
Team Colleague
Featured Poster
bguild
163
Posting Whiz
jalpesh_007
-3
Newbie Poster
Hameeda0410
0
Newbie Poster
JamesCherrill
4,733
Most Valuable Poster
Team Colleague
Featured Poster
Hameeda0410
0
Newbie Poster
JamesCherrill
4,733
Most Valuable Poster
Team Colleague
Featured Poster
Hameeda0410
0
Newbie Poster
JamesCherrill
4,733
Most Valuable Poster
Team Colleague
Featured Poster
Hameeda0410
0
Newbie Poster
JamesCherrill
4,733
Most Valuable Poster
Team Colleague
Featured Poster
Hameeda0410
0
Newbie Poster
Taywin
312
Posting Virtuoso
Hameeda0410
0
Newbie Poster
Be a part of the DaniWeb community
We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.