Win a copy of Testing JavaScript Applications this week in the HTML Pages with CSS and JavaScript forum!

Christian Mucyo

Greenhorn
+ Follow
since Feb 18, 2012
Cows and Likes
Cows
Total received
0
In last 30 days
0
Total given
0
Likes
Total received
0
Received in last 30 days
0
Total given
4
Given in last 30 days
0
Forums and Threads
Scavenger Hunt
expand Ranch Hand Scavenger Hunt
expand Greenhorn Scavenger Hunt

Recent posts by Christian Mucyo

How do you do that ? I always did it withing the paint method and my professor never showed us another way.



I am doing it this way, when I put it outside the paint method I am getting all kind of errors, not recognizing what g and g2D are..
8 years ago
I was using this code in the paint method..

8 years ago
Wow, thanks a lot darryl, that was it. I just did it and it works fine now. Thanks.
By the way, do you know how to setup a gradient background in java? I tried but it keeps going on top of everything else.
8 years ago
Hello greg, first thanks for answering so fast.

Yes, this is an applet but I am not using the repaint() method because when I try to use it it erase the hangman every time there is an error.

The code is in the actionPerformed method and each time I input a letter and press go all the statements are suppose to execute according to their conditions.

8 years ago
Hello everyone, I am have some trouble with a Hangman game that I am coding. It is not completely finish, right now I am coding the drawing of the hangman.

Here is the part of the code where am I having trouble to understand.



So my first issue is that the first time errors > 1 the line is drawn but then disappear and reappear with the second line at errrors > 2. I don't know how I can make the first line stay on the frame.

My other issue is when the application draws the legs of the hangman at errors > 11 and errors > 12. When it comes to that point, the whole hangman disappear and each time I put a wrong letter it flashes and I can see the hangman for about a second. I don't really see the issues here.

This is not the whole code so if you need to see the whole code please let me know.

Thanks
8 years ago
Thank you, I worked on it this morning and I got what you said.
Also one Last question, This program has to display at the end a report off all data entered for each type of person(CollegeEmployee, Faculty and Student)

And if there were no data entered for one type of person I have to display a message,
how can I search in the array if there is data or not?? I have never done that before and I have no clue.
8 years ago
I appreciate your comment, it was very helpful.

But what about the display() method ? I am getting the same error each time I try to call it.
I called it like this:

emp[x].display();
8 years ago
This is the parent class




This is one Subclass



And I have two other Subclass that I wont because they are basically the same as this one above. here is the class that contains Main():



I have not finish the coding yet, but at this point I am getting the same error over and over, can't seem to fix it:


Exception in thread "main" java.lang.NullPointerException
at CollegeList.main(CollegeList.java:41)



It is the first time I see this error and I don't understand it, can anyone please help me.
8 years ago