So yea, everything is working ect. Do Any of you have any words of wisdom for a newbie? I mean norm you seem to be like a demi god with java programming, did you struggle at any point even for a bit...
Type: Posts; User: gy1992
So yea, everything is working ect. Do Any of you have any words of wisdom for a newbie? I mean norm you seem to be like a demi god with java programming, did you struggle at any point even for a bit...
Yes, it makes a basic basic one window house. I hate it.
Next thing is to make another method which allows the user to change the roof color, and to add another window.
So yay, fixed it right before i went to work.
basically i kept making an error with
this.color = "color";
instead what i should of used was
this.color = color;
The class is supposed to allow for methods to be run of it so a picture can be drawn. I'm still getting the same problem, i can't seem to figure out how to separate 2 constructors in the same Square...
Do i need to add anything else to the MyPicture class? or should i keep each constructor separated in their own shape class?
So i have to change the second constructor in the Square class?
yea it was the color value, so i changed it to "red", "green" ect. That problem seems to have been solved anyway. Now my problem seems to be actually getting the program to not pick just the second...
Sorry i thought i had copied it already, this is the code that it highlights for me
if(colorString.equals("red"))
graphic.setColor(Color.red);
--- Update ---
I used a
Is there a way to quickly select line 124?
I wouldn't know how to do use the printStackTrace() in bluej.
if(colorString.equals("red"))
It highlights this bit of code each time the error happens.
--- Update ---
Hey, so new day new problem. I'm pretty sure i've gotten the constructors correct and i'm no longer getting the previous the error. However my code compiles without any error, but when i go and click...
I will do thanks
public class MyPicture
{
private Square square1;
private Square square2;
private Square square3;
private Square square4;
private Circle circle1;
...
Sorry for using 'line' i was meaning the second line in the onewindowhouse method.
basically how would i write the below method into the square class? so when the user starts the programme the 2...
Constructor Square in Square class cannot be applied to given types;
required:no arguments;
found:int,int,int,java.lang.string;
reason:actual and formal arguments differ in length
So for the...
So i'm trying "trying" to code something which creates a House. Below is the method i'm trying to use, however i keep getting this error message "that the operator i've used here cannot be used for...