Next Generation Emulation banner
1 - 11 of 11 Posts

· Thinking outside the box
Joined
·
1,570 Posts
Discussion Starter · #1 ·
Ok i have been having java for almost a year now, but i really havent learnd a thing in this year >.<

Wel after having a 7 for first semester and a 4 for second.. we stopped getting java. To improve the 4 the class has to make a crossroad with 4 traffic lights for car and 2 more for those traffic light that jumps green when ppl can walk over the street..

Wel to start with we have been using Jbuilder to program. I personly dont like the program..

What i would like to know what would be easyest java program ? and is it free to ? Cos i always had alot of problem programming with Jbuilder. And if there are any good tutorials about java online about it.
 

· Registered
Joined
·
1,585 Posts
Sephiroth[TR] said:
Wel to start with we have been using Jbuilder to program. I personly dont like the program..

What i would like to know what would be easyest java program ? and is it free to ? Cos i always had alot of problem programming with Jbuilder.
Borland's JBuilder is an excellent choice IMO, but if you want something really easy to understand, you could always try BlueJ.
 

· He's watching you.
Joined
·
1,222 Posts
Gaurav said:
Borland's JBuilder is an excellent choice IMO, but if you want something really easy to understand, you could always try BlueJ.
yes thats the one i choose but you'll at least 256 of ram and a fast computer.
 

· Thinking outside the box
Joined
·
1,570 Posts
Discussion Starter · #7 ·
thanks, il give exlips anf blueJ a try. The pc i work on in school arent so fast, 1ghz and 256ram. But should be able to run blueJ to :p
 

· Thinking outside the box
Joined
·
1,570 Posts
Discussion Starter · #9 ·
oh wel i just used Jbuilder :p Bad connection at school.
I got most things done of it now. Except for this:

i got 6lights 4 for cars 2 for were ppl wanna cross the road.. U know those things has a button u have to press to make the light go green. And making traffic light for car red to stop all other traffic so ppl can cross the street.

Im still wondering how it is being done.. I got a button implented already.. it just doesnt do a thing.. Is it being done by a true/if/false something ? And what am i looking for on that ?

Yea im horrible at java programming, or any other :(
 

· He's watching you.
Joined
·
1,222 Posts
Sephiroth[TR] said:
oh wel i just used Jbuilder :p Bad connection at school.
I got most things done of it now. Except for this:

i got 6lights 4 for cars 2 for were ppl wanna cross the road.. U know those things has a button u have to press to make the light go green. And making traffic light for car red to stop all other traffic so ppl can cross the street.

Im still wondering how it is being done.. I got a button implented already.. it just doesnt do a thing.. Is it being done by a true/if/false something ? And what am i looking for on that ?

Yea im horrible at java programming, or any other :(
you are going to use a lot of: while
For example:
while green.boton = on
Cars.move= off
people.move=on
-----------------------
you are getting the idea right?
 

· Thinking outside the box
Joined
·
1,570 Posts
Discussion Starter · #11 ·
uhu i understand that.. but i dont think thats what i need..
I just used a sleep function and set it on 2sec... after 2 sec it makes 2 light green for cars and than other 2 light green for cars..

The only thing i have drawd is a crossroad 4 traffic light for cars and 2 for the ppl and 2 button that doesnt do anything yet..

I was looking for a way to make the light go green for the ppl to walk if pressed on one of the 2 buttons.. And all other 4 light for cars green..

here is bit of what i got
//Stoplicht onder
g.setColor( Color.black );
g.fillRect( 265, 280, 20, 20);
g.setColor( Color.red );
g.fillOval( 265, 280, 19, 19);


//Voetgangs stoplicht Links
g.setColor( Color.black );
g.fillRect( 170, 100, 20, 20);
g.setColor( Color.red );
g.fillOval( 171, 101, 18, 18);

//Voetgangs stoplicht Rechts
g.setColor( Color.black );
g.fillRect( 310, 100, 20, 20);
g.setColor( Color.red );
g.fillOval( 311, 101, 18, 18);

//Slaap Functie stoplichten
slaap(2000);
g.setColor( Color.green );
g.fillOval( 215, 150, 19, 19); //boven
g.fillOval( 265, 280, 19, 19); //onder
g.setColor( Color.red );
g.fillOval( 170, 240, 19, 19); //links
g.fillOval( 305, 190, 19, 19); //rechts
slaap(2000);
repaint();

proly not as complicated as u thought :p Just my first year of java :p
 
1 - 11 of 11 Posts
This is an older thread, you may not receive a response, and could be reviving an old thread. Please consider creating a new thread.
Top