if(e.getSource() == choice2) {
			if(choice2.getSelectedItem().equals("Monitor"))   {
				choice2.setBackground(Color.GREEN);
                                hidebutton++
				score++;

						}
				else	{
				choice2.setBackground(Color.RED);
				}
				choice2.setEnabled(false);
				}

i have this code here...
why do when i apply this method the score is
incremented to??

would you plzz help me..

whAt is wrong 2 da Code...

4 example i have a button when i pressed it...

it must be the value of hide button and score is 1...

but in my code it shows that the score is 2 and the hide button is 1...

sorry 4 my bad english...

hidebutton++

isn't that statement missing a ";"?


i have this code here...
why do when i apply this method the score is
incremented to??

because you coded it that way?

sorry 4 my bad english...

do understand that we don't mind you having difficulties with English, we do, however, mind if you don't even bother to try typing a decent English sentence, so the " 1 kn0w wh0 y0u 4r3 " way to write your messages is not really showing us you're a real l33t-you-have-to-be-helped-first person, it shows us you're a l4zy-n0t-w1ll1ng-t0-put-1n-3ff0rt person

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.