File APIs for Java Developers
Manipulate DOC, XLS, PPT, PDF and many others from your application.
http://aspose.com/file-tools
The moose likes Applets and the fly likes Running Method more than once results in wrong results Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


Win a copy of OCA/OCP Java SE 7 Programmer I & II Study Guide this week in the OCPJP forum!
JavaRanch » Java Forums » Java » Applets
Bookmark "Running Method more than once results in wrong results" Watch "Running Method more than once results in wrong results" New topic
Author

Running Method more than once results in wrong results

Nizzle Jakeso
Greenhorn

Joined: Jan 17, 2008
Posts: 2
well.. I've posted this over at the official Java Forums but nobody seems to reply on that so I'll just try it again but then over here =D

I've got an applet in which the other can draw some stuff for organisation chart.. and blahblah
aanyways on subject.. when the user wants to save it I call this method:



which works fine.. the first time it gets run
then the 2nd time (or 3rd.. or 4th.. etc) the image goes wrong =(

here's what I mean
when it goes correct (first time)
http://img171.imageshack.us/img171/4369/goodjw9.png
then when it goes wrong (2nd and later)
http://img249.imageshack.us/img249/6228/wrongwm6.png

as you can see the top of the image is being weirdish =/

does anyone know why this is?
and/or how I'm supposed to fix this?

**EDIT**
whoa sorry for the overload of code..

[ January 17, 2008: Message edited by: Nizzle ... ]
[ January 17, 2008: Message edited by: Nizzle Jakeso ]
Ulf Dittmer
Marshal

Joined: Mar 22, 2005
Posts: 42371
    
  64
Hello "Nizzle ... "-

Welcome to JavaRanch.

On your way in you may have missed that we have a policy on screen names here at JavaRanch. Basically, it must consist of a first name, a space, and a last name, and not be obviously fictitious. Since yours does not conform with it, please take a moment to change it, which you can do right here.

As to your question, that's a too much code to read through, especially as the problem probably only occurs for some specific set of input data. Can you reduce it to a minimal version that still exhibits the problem?


Ping & DNS - my free Android networking tools app
Nizzle Jakeso
Greenhorn

Joined: Jan 17, 2008
Posts: 2
do I really have to put my surname? =/

**EDIT**
how about this..
changed the code AND my name
*yay for me*
[ January 17, 2008: Message edited by: Nizzle Jakeso ]
Ben Souther
Sheriff

Joined: Dec 11, 2004
Posts: 13410

"Nizzle Jakeso",

Please check your private messages.


Java API J2EE API Servlet Spec JSP Spec How to ask a question... Simple Servlet Examples jsonf
 
jQuery in Action, 2nd edition
 
subject: Running Method more than once results in wrong results