« first day (1100 days earlier)      last day (3842 days later) » 

1:08 AM
Can one use multiple ActionListener's in a single class?
 
 
3 hours later…
4:09 AM
Anyone on?
 
 
10 hours later…
1:53 PM
Hello friends!
 
Hey friend
 
How are you?
 
Meh.. you?
 
Sorry, i don't understand meh, but i thing you mean not good? I have bad knowledge of English. Thx, me boring. I trying to make sockets multyplayer game on swing. But it's hard.
 
I have to go now. Sorry. I'm sure you will figure it out.
 
2:03 PM
Good luck!
 
 
1 hour later…
3:12 PM
hey guys is it possible to use an ajax request in spring mvc to bind to an object?
 
 
5 hours later…
8:14 PM
@devdar yea try something like new ServletRequestDataBinder(myObjectToBind).bind(request);
 
8:38 PM
@jbolt Did you solve your YingYang problems?
 
The class works very well, the only issue is that when I call this from the drawing panel I cannot get the array that I use to store these
To update.
 
Are you familiar with the keyword "this"?
and how it is used?
 
When calling the moveTo method I call it as shape=shape.moveTo (x, y) which returns a transformed shape but the array doesn't update as I would expect
 
I wouldnt expect it to! Heres why, what you have built in your YingYang class is what is known as a immutable object. Strings are like this, what that means is when you do things like String.substring(0,10) it doesnt actually alter the string class but returns a new string that is altered accordingly
So in your shape.moveTo(x,y) you arent actually altering the yingYang object you are altering a new version of it and returning it. That new YingYang is nerer put back into your array
Following me?
 
8:54 PM
But wouldn't calling shape =shape. moveTo () replace the shape with the new instance?
 
No because you never replace that instance with the new on in your array and at the bottom of moveTo you have return new YingYang(at.createTransformedShape(yingYang));
The changes would apply if you didnt create a new shape. Do you need to implment the Shape interface by the way? You mentioned it was preferable over the Area class
 
I made the changes in the YingYang class to call new YingYang (at.createTransformedShape (this)) as you suggested
 
I got to go but heres what you should do. Instead of return new YingYang. You should not return a new shape. Look at this bit of code and make the same changes to your other methods like roatate and such public YingYang moveTo(double x, double y)
{
at = new AffineTransform();
at.translate(x, y);
transform(at);
return this;
}
That way you alter the current YingYang class and not create a new one. Also you keep using the same AffineTransform for all opertaion causing some weird behavior! Either dont use a global one or reset it every time you need to use it
Good luck! I will be on in a an hour or so if you still need help.
Btw your almost there I got it all running on my end. YingYangs are bouncing around off the walls like crazy
 
The original problem was a slow down once rotation starts 2 minutes in. I will keep pluggig at it. Thanx
 
9:35 PM
hey guys, quick question getting an error on this piece of code random.nextDouble(900.0-1.0) + 1.0;
the method nextDouble in the type random is not applicable for the arguments (double)
nvm
fixed it XD
 
9:59 PM
Hi, I wrote up an answer on Lambdas in Java 8,can I get a bit of feedback?
 
10:39 PM
@hexafraction Dude.. lame way to earn rep points. And obviously, new kind of rep-whoring.
 
11:06 PM
@brano Is it? It's not what I was intending at all.
What I'm looking for is criticism as I've never tried to write a canonical answer of this sort previously.
 
11:35 PM
@ ns47731 I was looking at your last post and what you have is pretty much what I was doing prior to changing the base class. The primary issue was that I was getting a slowdown in animation over the course of 3 minutes. It seems that when rotation starts is where we begin to see it slow down and within a minute the animation is crawling.
 

« first day (1100 days earlier)      last day (3842 days later) »