hello friends, need ur help, dnt knw what's wrong. A different code runs(i.e a code i ran previously) instead of the present code on my editor that i tried running after coding. here is the present code

i'll be gratefull to knw the cause soln, both code are same package. thanks!

May 23rd, 2013, 10:07 PM

jps

Re: A different code runs

What do you mean "A different code" runs.
What do you mean "the previous code that wouldn't stop running"
I do not see anything wrong with either class posted, what seems to be the problem?
What code are you using to create these "JPanels" and display them?

May 23rd, 2013, 10:52 PM

chized

Re: A different code runs

i use eclipse, tried running the first class, doesnt show any error but, the second class runs instead. it seems the second class is overwritting or stoping the first class from running(or showing). cant see the output of ths first class . thanks

May 24th, 2013, 01:39 AM

jps

Re: A different code runs

What code are you using to create and display these JPanels?
What type of output do you expect to get from a paintComponent method in an otherwise empty class?

May 25th, 2013, 09:31 PM

chized

Re: A different code runs

i finally found my mistake, am newbie. both class use same main, i didnt put the name of newer class in the main, that's why the previous class kept running. tnx