I solved the problem by noting the connection between the paintComponent-method, the paint-method, and the repaint-method. My code for the house and a new class is show below. (The new class was the...
Type: Posts; User: SOG
I solved the problem by noting the connection between the paintComponent-method, the paint-method, and the repaint-method. My code for the house and a new class is show below. (The new class was the...
The class I am in is called House.java and it extends JApplet - it's meant to draw the house from my textbook. (I'm not in a school-class for this - it's done by me alone for practice.) So there are...
That is what I tried to do, but I think I'll need a sample of code to figure this out - getting the paintComponent-method to work with the getX- and getY-methods as you pointed out in post number-3.
Here is how the windows/doors are handled in the code, in fact I'll give you the whole paint-method:
public void paint(Graphics g)
{
// Call the superclass...
Just so someone knows, I am trying to paint over the black windows to make them cyan, and paint red over the door. My assignment requires me to use code to paint or draw over the existing-parts, or...
What I am trying to do is draw a house with code relative to getting it's doors and windows closed when I click on them in an applet.
Here is the house I drew with code,
2305
and if you...
I finally fixed the problem with the given security advice by installing the Java Runtime Environment before I applied the advice itself. So, thanks Norm. This thread is solved.
I noticed something else, and it's been happening the whole time, even after I tried what you said. My browser (Internet Explorer 10) has been restricting my page from running scripts or ActiveX...
I see what you mean. Now I know the only problem for me is getting the html-file to display an applet. I use this kind of html-code format for it, so tell me if it's outdated and/or flawed:
...
I notice that I did just that, but the medium-level didn't work, and the low-one made the computer show this:
2273
In other words: I should just trust what's in the CD anyway, and know that...
When I try to open an html-file with an applet from my student-CD, I click on an error-message for more details to get this window for the forum to click on,
2271
then got this other window to...
Thanks helloworld922. I got rid of the warning.
I'm getting this message from my compiler...
Note: ShadeDesigner.java uses unchecked or unsafe operations.
Note: Recompile with -Xlint:unchecked for details.
...and it seems to go away...
I noticed that my compiler said nothing was wrong with my debugged program thanks to knowing continue is a keyword. Thanks for the help.
It so happens that my compiler is telling me there is something wrong with the 2 bottom statements of this do-while loop, just above the while-part.
My ideas for solving this are to either...
Thanks. I finally got the needed response from the computer with the equals-method's help.
The problem I should've mentioned is that the current loop I have now just makes my method return the same string-statement I typed in as a user.
For example:
The program's output comes as a...
I got past the part where there are too many elements, but I still need help finding the word-replacement substring for the program.
Here is my current code-setup:
// Use the...
I notice that my method doesn't work even though I tried to get it's while-loop set-up to do the following things:
Have each token of a string get put into another one
Replace each...
I got the method to show the most frequent-character now. Thanks for your help.
Now all I would have to do is do this sort of thing on a bigger scale (with a bigger loop-setup, but...
The purpose of executing the program is just for home-project practice with a textbook, but I wanted to see if I could get it done this way: without the warning for the computer. So, I need help with...
What I was asking in the last question was if it was practical to get either me or the user to tell the computer what characters to look for beforehand, so making an array of characters to look for...
I realize - now - that I must have gotten ahead of myself with the logic: I thought that using a 2D-array would help to arrange the characters as if they were in rows and columns. I tried to count...
I went ahead and redid my code to try something out, so I might as well give it to the forum as is - it's part of what I'm doing. Instead of using Unicode numbers, I just decided to use a...
My goal is to get the most frequent character referred to in the title by:
Storing character-set in an array
Rearranging the array - somehow - as Unicode-numbers
Comparing the...