well, its not about quickness of painting I'm talking because that is fast enough. Its about wanting to paint an image but getting a nullpointer exception because the image isn't ready yet.
The painting happens the same way, with drawImage.
All I want is when I tell the image to load itself, it...
Well, I don't exactely know how it works but I'm also making a game in Java, and when the client starts up, I want it to load all its images so that the rest of the game would run smoothly.
I put them all in an array of images. The first screen displays fine(only contains 4 different images of...
Will this way of loading an image avoid lazy-(pain-in-the-***)-loading of images ?
Greetz,
NOSPAM_themuppeteer@hotmail.com (for mails, remove the NOSPAM_)
www.themuppeteer.tk
"Those who say they understand chess, understand nothing"
-- Robert HUBNER
Hey, this might be a solution, lets do the a.changeit() and b.changeit() in a serializable transaction. Then the method does its stuff and everything else is on hold.
Ed Roman in Mastering ejb's page 314:
SERIALIZABLE
You can easily avoid phantoms (as well as the other problems described...
Yes, we've already noticed that it is not easy to find solutions for several things (this one, speed of entity beans,the fact that non persistent field in entity beans are somehow forgotten after passivation etc..)
Wel, anyway, thanks for the discussion and the CriticalHelper idea. Might come...
You're right about the site,but knowing what you can't do is a start, and its better to search for an alternative solution then doing it wrong and being in troubles in a year because you started on the wrong foot I think.
This would mean that all A and B calls would have to go via the...
Well, this would work, but then you have to make it a final static variable, otherwise it is also not permitted (see text below).
But the problem is that the two changeit methods are not in the same class (remember a.changeit(), b.changeit())
------------------...
And what application server are you using ?
Jboss does not let you deploy your bean if it contains threading. And it shouldn't either if I can believe the sun-site
-----------------------
http://java.sun.com/blueprints/qanda/ejb_tier/restrictions.html
and click on discussion on threads...
Hello sedj,
thanks for your quick answer.
Didn't mean to offend you, sorry if I did. I was just telling the state of mind over here. We have 6 months of experience with J2ee and are still in learning fase.
If you write a bean wich uses threads, you'll get errors when trying to deploy it to...
Hello sedj,
I thought I understood it, but when I explained it to my colleagues, they had serious doubts with your answer..
First of all, people were wondering if 'synchonized' is allowed in J2ee (since threads aren't allowed either).
Second, presume that you have that one access-to-changeit"...
Aha, now I understand :)
thanks a lot for the clarification sedj!
Greetz,
NOSPAM_themuppeteer@hotmail.com (for mails, remove the NOSPAM_)
www.themuppeteer.tk
"Those who say they understand chess, understand nothing"
-- Robert HUBNER
ah ok..I see..
But that means that in my method f1, I can not change a and b in 1 turn. Because while I'm changing a, somebody else might change b and I can not stop him.
Greetz,
NOSPAM_themuppeteer@hotmail.com (for mails, remove the NOSPAM_)
www.themuppeteer.tk
"Those who say they...
hmm,
what does this mean exactely ? Will a and b be locked from the start of the method until the end of the method ?
Guess not since you suggested:
f1 a.changeIt();
f2 a.changeIt();
f2 b.changeIt();
f1 b.changeIt();
?
or will the method of that bean not be accessible for 2 clients at the...
All those threads.. are we still talking J2EE here ?
I forgot to say that must asume that the db is only in a consistent state after that a.changeIt() AND b.changeIt() are done. (think of the typical bank account application)
So in this case,
f1 a.changeIt();
f2 a.changeIt();
f2 b.changeIt()...
Anyway, the answer is way to late and what the hell is this doing in a J2ee forum ?
...
:(
Greetz,
NOSPAM_themuppeteer@hotmail.com (for mails, remove the NOSPAM_)
www.themuppeteer.tk
"Those who say they understand chess, understand nothing"
-- Robert HUBNER
This is really messy code..
I could give a hundred remarks and hints about this ..
Use only 1 g var to paint on, the one given in the paint(Graphics g);
In your paint method, all you may do is paint! don't put showInputDialogs in there.
So what you do, is everytime the field wants to paint...
Hello,
Can anyone tell me what happens when you do the following thing in J2ee (in jboss for instance)
I have 2 session beans with the first a function f1 and second the function f2, each calling the same 2 entity beans.Each function runs in a transaction as usual in J2ee
f1()
{...
Hello Guys,
I'm looking for a stand-alone swf player for linux, but it has to be one that can be started command line and preferably without a browser bar on top and no menu, just a plain flash player.
Anyone knows where to get such a thing ?
thnx!
Greetz,
NOSPAM_themuppeteer@hotmail.com...
Well, players will have to be able to chat against each other, but that I can do also via the db.
If I would use the xml stuff you are talking about, would that be able to pass through firewalls then ?
Could you give me a very simple example (or a link) about this just to let me get the basics ...
Hello guys,
If I wanted to make a multiplayer game in flash, that has an access db on the webserver to keep the clients in sync, and the clients call asp pages to do queries on the db (with loadVariables)(like the state of the map), about twice a second would be nice but certainly not slower...
This site uses cookies to help personalise content, tailor your experience and to keep you logged in if you register.
By continuing to use this site, you are consenting to our use of cookies.