JEditorPane, setText, and redraw problems.

This code was borrowed from another post on the forum. The aim is to append lines of text onto the bottom of the editor pane.
    JEditorPane messagePane = new JEditorPane("text/html", "");
    String text = messagePane.getText();
    text = text.substring(text.indexOf("<body>") + 6, text.indexOf("</body>"));
    text = text + "<br>" + message;
    messagePane.setText(text);It works, but the whole editor pane flashes when setText is called.
Is there anything I can do to prevent this? I've tried setDoubleBuffered(true) but that doesn't seem to work.
There are a whole lot of methods on HTMLDocument like insertBeforeEnd which should allow me to insert content before the end body tag, but they don't work anyway.

I've encoutered this problem and I use the following to replace the call to setText, actually this call causes the flicker effect you experience (for some obscure reason involving callbacks and property change)
        String myString = "<html><body>Sample text, put yours here</body></html>";
        EditorKit kit = this.messagePane.getEditorKit();
        Document newDocument = kit.createDefaultDocument();
        StringReader reader = new StringReader(myString);
        try
            kit.read(reader, newDocument, 0);
            this.messagePane.setDocument(newDocument);
        catch (Exception e)
            this.messagePane.setText("Error " + e);
        }Et voil�, no more flickering !

Similar Messages

  • Photoshop performance and redraw problems

    Hello,
    I'm running Photoshop CS5.1 x64 12.1 on a Windows 7 SP1 machine with all updates installed and the latest AMD 13.9 drivers for my HD6850 card. The PC has 8GB RAM.
    Whenever I zoom in, there is an annoying redraw effect whereby the image "tears" as it's redrawn in "squares". This is not the usual vsyncless tear because if i simply scroll the image left and right it does not happen. To fix this, I can enable OpenGL and the tearing will be gone. However, when OpenGL is enabled the brushes lag quite badly. Sometimes it takes a full second from the moment I start a stroke to the moment it appears on screen. I've set OpenGL to basic and disabled all other options such as vsync and anti-aliasing. I've tried setting the cache levels to 8 and all cache tile sizes, restarting PS after each setting change. I've found it impossible to eliminate PS's non-OpenGL zoom tearing and brush lag when OpenGL is enabled, so I'm forced to fix one and live with the other.
    I'd appreciate any advice, thank you.

    I guess you'll have worked through the steps in this link?
    http://helpx.adobe.com/photoshop/kb/optimize-performance-photoshop-cs4-cs5.html
    It sounds like you are seeing the tiles that Photoshop splits the screen into.  You really need Chris Cox to give you the best settings and other advice, but this might be one of those times when the 'Tall and thin/Default/Big and fat' options make a difference.  I'm going to hazard a guess that setting a smaller tile size would be best.  Short of a system upgrade that is.
    http://www.adobe.com/inspire/2012/04/configuring-photoshop-optimal-performance.html
    http://www.thelightsright.com/OptimizePerformanceCS5-Part2

  • JEditorPane setText problems

    I'm having problems in setting styles after using setText with JEditorPane.
    For example I enter a line of text in the JEditorPane, highlight this in bold and then save it back to file. I then load this line of text back into the JEditorPane using the setText method and I see my highlighted line of bold text. I then go to unmark the bold highlighting of the line and this appears to have been done correctly but when I go to view the contents of the JEditorPane's document I find that the bold hasn't actually been removed from the content but it appears to have done so looking at the JEditorPane.
    Has anyone else had this problem?
    I have found someone who has described a very similar problem at the following link
    http://groups.google.com/groups?q=jeditorpane+setText&hl=en&selm=3B7BEBD2.24EE2EE8%40home.com&rnum=6

    I've had this Problem when I was building a HTML-Editor-Applet.
    The Problem was, that there was a Style-Attribute like e.g. text-decoration:underlined. If I removed the underlined style the Attribut was text-decoration:none, but the getText() method just cared about the Style with the name text-decoration to handle this Element as underlined. I had to build my own getText() method by examing all the Elemntes from the Document and set the html-Tags for the style-attributes.
    J&ouml;rn

  • 10.5.3 Update- Window redraw problems in Finder and all Apps

    Hallo there. After installing the update on my MacBook Pro 2.4GHz I am getting irritating redraw problems in all Apps with scrolling possibilities incl. the Finder. Especially Safari. Triple stuttered lines make it impossible to read anything.
    On top of that the permissions are cocked up. The System is telling me not to transfer an iWEB website to a USB stick cos I don't have the privileges. Virtual Sick just splattered over my screen.
    This ultra expensive machine only has its justification because it is a tool and I want to WORK with it. Not long and this bean-can is flying out the window.
    This is an ultimate pain. I wish the updates would work. It's just so unprofessional. So "Windows". I wish Atari was still building computers.
    Is anyone out there that knows anything about this?
    Would appreciate any help.
    Thank you.

    Have you tried doing anything? Try running Disk Utility
    Disk Utility
    http://docs.info.apple.com/article.html?artnum=302672

  • Mac Pro 2007 with Nvidia 8800GT screen redraw problems on Mac OS 10.5.2

    I seem to be having a slight screen redraw problem. Such as when grabbing the browser window and moving up and down it seems the redraw can't keep up,also seems problematic when watching flash or other video online. It does it in the finder too for windows listings or in icon view there is a fluttering or flashing back and forth, kind of like a white super split second flash when dragging the window box smaller or larger not as bad as when making smaller. Hard to describe but my original Ge-force that I pulled was not having these characteristics. I figure that the drivers need tweaking. In windows I am not getting these results. I have newer boot camp installed as well as the leopard graphics update done so I am trying to see if others are having a slight problem or maybe it is me.
    Also I make certain it is not heat related as I monitor that and it does not matter at what temp it is.

    Here's another similar experience -- and my solution.
    I bought a Quad-core 2.8GHz (8GB RAM) Mac Pro in May and got the "better" Nvidia 8800GT. I thought I was happy, but there were redraw issues after sleeping and a display "roughness" I found annoying. Upgrading to OSX 10.5.4 didn't help.
    I found it to be mostly absent on startup, but sleeping the Mac would bring it on. I.e., after sleep, the relatiionship between the 8800GT would be different than before. when I logged out and in again, the problem woud vanish. No what I expect from a "superior" graphics card. I ascribed it to funky drivers from Apple.
    The store I bought the Mac from offered to swap for my suggestion of an ATI HD 3870, so I went for it about a week ago.
    This card is far smoother than the 8800GT and just as fast in rendering benchmerks for graphics. (I'm not a gamer.) I am a happy camper! There is no stuttering, oddball redraw, or jerkiness as there had been with the 8800. It's perfect! Never mind that it may be 5% slower for gamers, it feels faster for my use.
    BUT NOTE: As I now see from reading several forums, I wasn't alone is getting a screaming-Mimi at first! The first 3870 ran at nearly full fan speed at power-up. The speed changed a little with resolution changes on my big Mitsubishi CRT monitor, and actually stopped when I switched to 1080x1920 @ 72Hz! Then the fan would start and quit, start and quit randomly -- convincing me it was defective.
    I returned this RED-shrouded unit and the store replaced it, this time with (randomly) a BLUE-shrouded unit. (Slightly lower serial.)
    Bottom Line: This replacement 3870 is quiet as a mouse! Fan runs near-silently at startup and after hours of regular use in a 75ºF room. I get the distinct feeling that a bunch of cards with wonky fan controllers were built, and some of us got 'em.
    Bad News: The ATI HD 3870 does NOT support multiple refresh rates under Windows XP-SP2 booting the Mac Pro, with or without Boot Camp drivers installed. No version of the ATI drivers fixes this, and ATI does not officially support Boot Camp yet. You can choose a resolution okay, but you're stuck at 60Hz refresh -- a pain for those of us who hate 60Hz flicker. (I like 100Hz refresh.)

  • Photoshop CS4 Redraw Problem

    I have a strange problem that just arose yesterday, running 11.0.1, up to date Bridge and Photoshop.
    What happens is, when I have an image open, and do any adjustments (curves, actions), the action will complete, but the image will not redraw until I either resize the window or apply a paintbrush to it. It's not a latency issue, it just never happens.
    Also, the menus on top are all out of whack. If I select one drop-down, such as filters, then move my mouse to another drop-down, only the first drop-down stays active (for example, if I click Filters and mouse over to Select, nothing will change).
    I've re-installed, even deleted all the configuration and any traces of Adobe and the problem still exists and is extremely frustrating.
    I would appreciate any help, short of a format, to fix this problem.
    OS X 10.4.11
    2 Ghz Core 2 Duo
    4GB 667 DDR2 Ram
    320GB Hard drive, almost half-empty
    EDIT: just to clarify, I have removed all of the plugins, plugin preferences, with the exception of camera raw 5.2. all of my software and firmware is otherwise up to date and I have already tried to tweak the cache settings to no avail. this problem practically happened over night.

    Wow - I wouldn't have expected a mouse driver to cause drawing problems.
    You might want to contact Logitech and let them know about this...

  • 8350i: Changing the font size results in screen redraw problems

    Hey everyone.  
    BlackBerry 8350i
    v4.6.1.204 (3.0.0.73)
    BBAlpha Sans, size 8
    When the screen redraws to account for a change in font or font size, there is a redraw problem that overwrites portions of the menu.  Steps to repro and some supporting dialogue from a 3rd party software developer are below.
    Steps needed to observe the problem:
    Go to Options -> Screen / Keyboard.
    Select Font size.
    Roll up and down between the different available font sizes.
    Observe that sections of the font size menu disappear and reappear as the "Quick brown fox" example text is redrawn.
    I have always thought that menus should receive visual preference, meaning that anything redrawn in the background should not overwrite them.  The 8350i does not seem to honor this convention, however.  Instead, the sample text renders in front of portions of the font size menu list, making those portions of the menu disappear.
    Case in point: AstraSync 3.0, just out of beta, uses some nice stylization for its main email presentation screen.  However, when you click the menu button, the menus are slowly devoured by the background text and eventually become invisible.  I reported this issue to AstraSync tech support and they have stated that this appears to be a bug in the 8350i, not their software:  
    James and others, Unfortunately the problems with the menu disappearing 
    appear to be a device issue and as such is not something that we are 
    able to fix.
    -Vicky Cwilewicz, Wednesday, April 08, 2009 
    http://forum.astrasync.com/Default.aspx?g=posts&t=649
    This conversation occurred while the AstraSync software was in beta, and I have confirmed that the issue continues now that the software is out of beta.  Given the phone's own rendering issues within Screen/Keyboard, I think their claim, that this represents a bug in the phone itself, has some merit.  Any thoughts or advice on a workaround?  Assuming that this is truly a bug in the device software itself, will RIM please consider addressing it?
    Thanks,
    James 
    Message Edited by jmegna on 06-02-2009 01:16 PM

    This problem is also evident in Opera Mini. A bit of googling revealed it was introduced in OS version 4.6.1.128. This is quite clearly a device bug and we would appreciate a response from RIM on the matter.
    Cheers

  • Redraw problems in iTunes 7

    Just ugraded to iTunes 7.0.0, and I'm having window redraw problems. Whenever I play a video or go to one of the new fancy album art views (the latter of which usually won't display at all), it ends up causing a semi-random rectangular portion of the iTunes window to not redraw. So if I go back to the song list, it'll still be displaying the previous screen's information, though it still functions correctly as far as playing songs is concerned. If I drag the window down so that area is off-screen, then back again (or minimize and restore), it redraws the correct current screen. But then as soon as I scroll or anything, the visual bit gets stuck in that section again. (At least the program itself isn't freezing.)
    I do have a fairly old video card. I have a four-year-old dual-867 G4 (MDD). I thought I had the cheapest video card available at the time, which I thought was an ATI, but my System Profiler claims I have an nVIDIA 32MB GeForce4 MX (AGP). It's driving two 1600x1200 displays.
    I really like all the new features of iTunes 7, and the higher-quality video from the store. And I'm not really mad since I can still make everything work. But I'd have to agree with others here that Apple didn't do thorough enough testing this time around.
    Ironically, everything I've tried so far worked fine on my Windows box at work... but it is brand new (3GHz dual core, just got them last week)... and only driving a single 1280x1024 display.
    Anybody else find any fixes? I hope Apple has an update soon that fixes this.

    It only partially fixed the problem for me. Prior to doing it, I was okay if I started up in old-style list mode and stayed there. If I switch to another mode, updates would just immediately die and I couldn't really do anything.
    After the fix, I can now switch between the modes and things continue to work. I can also use the album view just fine. However, the cover view is still broken. It at least draws the covers now (instead of just a white box or an un-updated portion of the library list, which is what I got before), but the scroll controls in the covers area are just white boxes.
    I'm on a G4/450 (Sawtooth) upgraded to a G4/1.4. I have two monitors running at 1600x1200, one on a 16 MB ATI Rage 128 Pro and the other on a 16 MB ATI Rage 128. My iTunes window is roughly 1600x960 pixels in size.
    I saw that someone posted the minimum VRAM requirement for iTunes 7 as 16 MB. Where did they find this? All I saw on the download page when I checked yesterday was that it required some G3 variant - nothing about VRAM. And, I don't think many (an?) G3-era machines had 16 MB VRAM, so making that requirement explicit would seem important.
    PB G4 12 1.33; PM G4/450->1.4   Mac OS X (10.4.7)  

  • Premiere Pro  CS4 After Effects CS4 Redraw problem

    Greetings. I can't quite figure out how to research this problem. I have included some pics to the
    screen grabs to illustrate my point.
    The problem is, I have a redraw problem with all Adobe programs that have a timeline in them. Flash, After Effects, Premiere Pro;
    I am using a 8800GTS card with the latest drivers from nVidia's website.
    As you can see I have multiple mouse images that remain on the screen when I scrube the time line ( in all adobe programs). There is also another really weird problem; when I open a quicktime movie with PPro CS4 open the audio runs at half speed or slower. When I close PPro the audio reverts back to normal speed?
    I am using: Borris CC6 Boris 9.2 Boris Red 4.3, Genarts Sapphir Effects, Pixelan Spicmaster 2.5, and Hollywood FX 5 plugins.
    Any light on the subject would help or if you could point me in the right direction I'll do the research.
    Thanks for the help.
    Jan

    assuming the problem is only in adobe apps and not anything else right?
    Hmm...
    Well, you can try some of these things
    trash the prefs and clean media cache, though I doubt it will help you in this case
    try with a new project and see if the problem persists
    uninstall ALL plugins and see if that corrects the issue (clearly HFX5 was never meant for CS4 at a minimum and I'm not a fan of old boris stuff - very buggy)
    uninstall and reinstall the Adobe apps and see if that fixes the issue.  If it does add back in CS4 compatible plugins only one at a time and see if the problem returns.
    also what os are you using and how much memory do you have?  could you be running out of memory on a 32bit os?
    Dennis

  • Screen sharing redraw problem

    I am seeing graphical redraw problems when I try screen sharing with another Mac 10.8 computer, Mac Mini mid 2011. For example, when switching menus, the old ones remain. This always worked just fine in Lion. I tried turning adaptive and scaling off and on, but no difference.

    Don't know whether I found the problem, but I did manage to get Screen Sharing working reasonably again.
    Things had gotten so bad that even mouse moves and keystrokes were getting mangled and delayed, so I decided to try a VNC client (Chicken of the VNC) to see whether things were better. I had to set the host machine to accept VNC connections, so you could say I "touched" the screen sharing panel in System Preferences. I also shut down the Screen Sharing app on the client side so I could use the VNC. The VNC worked OK but would not display the entre screen, so I quit. Then I restarted the Screen Sharing client, and--hey presto--it worked! Response to mouse & keyboard were back, and video was good enough to watch a video.
    So, I guess folks could try (1) jiggling something in the Screen Sharing prefs on the host machine, and (2) restarting the Screen Sharing client.
    -- rick

  • MacBook projects on Mac Pro: redraw problems in timeline

    Hi all,
    my main workstation for Premiere Pro CC 2014 is a 2010 Mac Pro, abroad I'm editing on a 2013 15" MacBook Pro Retina. Transferring projects from the Mac Pro to the MacBook Pro works fine, but every time I (re)-open a project on the Mac Pro, which was edited/saved on the MacBook Pro before, I have massive redraw problems in the timeline: It is mostly black, when I move the mouse some rectangles underneath will become gray, others black... – in simple words: it's not possible to work with this timeline at all. Switching between CUDA/GPU doesn't help, deleting previews, re-opening windows doesn't help either.
    When I create a new sequence, it looks fine, but I can't copy all clips of a messed up timeline to this new sequence, because Premiere only "sees" and copies a small fraction of the clips. The only workaround I found, was to IMPORT the sequences from the MacBook Pro projects. In this case everything looks and works as expected.
    Has anybody seen problems like this?

    Hi Ralph,
    rklem wrote:
    This is a moderated forum, right? So can I expect Adobe to comment on this serious issue of a paying customer? No response here after one month. No response either from support, where I reported this bug a few weeks ago. Maybe I should try Twitter instead...
    We do monitor the forums but it's impossible to answer every post. We do rely on the community helping us out in this regard. You could try Twitter, but we usually point people back here so we can discuss the issues more easily.
    You say you contacted support.
    Did you start here? Contact Customer Care
    Did you deal with the video queue?
    Do you have a case number?
    Let us know so I can help you more easily.
    rklem wrote:
    I have updated the NVIDIA software to the latest version, which didn't change anything.
    I would make sure that you are running precisely the same CUDA driver for each system.
    Thanks,
    Kevin

  • CS5 screen redraw problems

    Hi All
    I'm running CS5 on XP32SP3. 3GB RAM. ATI Radeon 5450 (512MB, OGL 3.2, Catalyst 10.5 drivers).
    I am having problems with the screen not redrawing after deletion of layers, selections, hide/show selections and deletion of selections.
    (Screen redraw is real time when adjusting opacity (etc) sliders, and panning large images is silky smooth).
    I am working on an image with 20 grouped layers and it's getting VERY confusing when changes to layers do not appear on screen.  ;-(
    (As a work around clicking select,cursor, appears to force a redraw, but it is a tad annoying to keep doing this).
    Can I create a HotKey (Space Bar) to force a redraw??
    Is there a fix for this problem?
    I also have this same problem on my home system (Win7, nVidia 5700), so it does not appear to be either an XP or ATI driver issue.

    New observations.
    Trying different Cache Levels and Cache Tile Size changes the behaviour of the problem. History states appears not to.
    It's pretty random; increasing cache levels and decreasing cache levels (from default 4) makes things worse. At worst hiding/showing a layer can only be done by clicking selection, cursor, selection... even then the now visible level is often missing chunks (tile size?).
    I am not alone   http://forums.adobe.com/thread/631269?tstart=0
    My home PC is not using OGL and has the same problem.
    There is definitely a redraw problem in CS5.
    Thanks to all who are trying to help...    ;-)
    Guy

  • I am not able to launch FF everytime i tr to open it, it says FF has to submit a crash report, i even tried doing that and the report was submitted too, but stiil FF did not start, and the problem still persists, please help me solve this issue in English

    Question
    I am not able to launch FF everytime i try to open it, it says FF has to submit a crash report,and restore yr tabs. I even tried doing that and the report was submitted too, but still FF did not start, and the problem still persists, please help me solve this issue
    '''(in English)'''

    Hi Danny,
    Per my understanding that you can't get the expect result by using the expression "=Count(Fields!TICKET_STATUS.Value=4) " to count the the TICKET_STATUS which value is 4, the result will returns the count of all the TICKET_STATUS values(206)
    but not 180, right?
    I have tested on my local environment and can reproduce the issue, the issue caused by you are using the count() function in the incorrect way, please modify the expression as below and have a test:
    =COUNT(IIF(Fields!TICKET_STATUS.Value=4 ,1,Nothing))
    or
    =SUM(IIF(Fields!TICKET_STATUS=4,1,0))
    If you still have any problem, please feel free to ask.
    Regards,
    Vicky Liu
    Vicky Liu
    TechNet Community Support

  • BOSD, Battery issues and Heating problem after iOS 8 upgrade

    i have upgraded my iPad mini to iOS 8. Ever since I upgraded to iOS 8 am facing blue screen issues and heating problem as well. This is really frustrating even the patch iOS 8.0.2 dint solve the problem. Are you guys listening our complaints. When will you fixing it.

    The same thing happened to me on my 2012 Subaru Outback.  I'm not sure this will help you since you have a Honda, but I'm posting this just in case.
    I paired the audio on my car with my iPhone 6.  However, when I turned the car off and back on again, the iPhone would not pair automatically.  I had to manually connect the iPhone with the car.  Turns out there are two separate bluetooth pairings on my car: one for phone which allows up to 5 devices and one for audio which allows only one device.  So I did the second bluetooth pairing for the phone (had already done the audio), and that fixed it.  YMMV

  • I am making code to try to make a game and my problem is that my code......

    I am making code to try to make a game and my problem is that my code
    will not let it change the hit everytime so im getting the first guy to hit 1 then next hits 8 and so on and always repeats.
    Another problem is that I would like it to attack with out me telling it how much times to attack. I am using Object oriented programming.
    Here is the code for my objects:
    import java.lang.*;
    import java.io.*;
    import java.net.*;
    import java.util.*;
    import java.util.Random;
    import static java.lang.Math.*;
    import java.awt.*;
    import java.awt.color.*;
    class rockCrab {
         //Wounding formula
         double sL = 70;                                   // my Strength Level
         double bP = 1;                                   // bonus for prayer (is 1 times prayer bonus)
         double aB = 0;                                 // equipment stats
         double eS = (sL * bP) + 3;                         // effective strength
         double bD = floor(1.3 + (eS/10) + (aB/80) + ((eS*aB)/640));     // my base damage
         //Attack formula
         double aL = 50;                                   // my Attack Level
         double eD = 1;                                   // enemy's Defence
         double eA = aL / eD;                              // effective Attack
         double eB = 0;                                   // equipment bonus'
         double bA = ((eA/10) * (eB/10));                    // base attack
         //The hit formula
         double fA = random() * bA;
         double fH = random() * bD;
         double done = rint(fH - fA);
         //health formula
         double health = floor(10 + sL/10 * aL/10);
         rockCrab() {
         void attack() {
              health = floor(10 + sL/10 * aL/10);
              double done = rint(fH - fA);
              fA = random() * bA;
              fH = random() * bD;
              done = rint(fH - fA);
              System.out.println("Rockcrab hit" +done);
    import java.lang.*;
    import java.io.*;
    import java.net.*;
    import java.util.*;
    import java.util.Random;
    import static java.lang.Math.*;
    import java.awt.*;
    import java.awt.color.*;
    class self {
         //Wounding formula
         double sL = 1;                                   // my Strength Level
         double bP = 1;                                   // bonus for prayer (is 1 times prayer bonus)
         double aB = 0;                                 // equipment stats
         double eS = (sL * bP) + 3;                         // effective strength
         double bD = floor(1.3 + (eS/10) + (aB/80) + ((eS*aB)/640));     // my base damage
         //Attack formula
         double aL = 1;                                   // my Attack Level
         double eD = 1;                                   // enemy's Defence
         double eA = aL / eD;                              // effective Attack
         double eB = 0;                                   // equipment bonus'
         double bA = ((eA/10) * (eB/10));                    // base attack
         //The hit formula
         double fA = random() * bA;
         double fH = random() * bD;
         double done = rint(fH - fA);
         //health formula
         double health = floor(10 + sL/10 * aL/10);
         self() {
         void attack() {
              health = floor(10 + sL/10 * aL/10);
              fA = random() * bA;
              fH = random() * bD;
              done = rint(fH - fA);
              System.out.println("You hit" +done);
    }Here is the main code that writes what the objects do:
    class fight {
         public static void main(String[] args) {
              self instance1 = new self();
              rockCrab instance2 = new rockCrab();
              instance2.health = instance2.health - instance1.done;
              System.out.println("You hit: " +instance1.done);
              System.out.println("rockCrabs health: " + instance2.health);
              instance1.health = instance1.health - instance2.done;
              System.out.println("RockCrab hit: " +instance2.done);
              System.out.println("rockCrabs health: " + instance1.health);
              instance2.health = instance2.health - instance1.done;
              System.out.println("You hit: " +instance1.done);
              System.out.println("rockCrabs health: " + instance2.health);
              instance1.health = instance1.health - instance2.done;
              System.out.println("RockCrab hit: " +instance2.done);
              System.out.println("rockCrabs health: " + instance1.health);
              instance2.health = instance2.health - instance1.done;
              System.out.println("You hit: " +instance1.done);
              System.out.println("rockCrabs health: " + instance2.health);
              instance1.health = instance1.health - instance2.done;
              System.out.println("RockCrab hit: " +instance2.done);
              System.out.println("rockCrabs health: " + instance1.health);
              instance2.health = instance2.health - instance1.done;
              System.out.println("You hit: " +instance1.done);
              System.out.println("rockCrabs health: " + instance2.health);
              instance1.health = instance1.health - instance2.done;
              System.out.println("RockCrab hit: " +instance2.done);
              System.out.println("rockCrabs health: " + instance1.health);
    }when the code is run it says something like this:
    you hit 1
    RockCrabs health is 9
    RockCrab hit 7
    your health is 38
    you hit 1
    RockCrabs health is 8
    RockCrab hit 7
    your health is 31
    you hit 1
    RockCrabs health is 7
    RockCrab hit 7
    your health is 24
    you hit 1
    RockCrabs health is 6
    RockCrab hit 7
    your health is 17
    my point is whatever some one hits it always repeats that
    my expected output would have to be something like
    you hit 1
    RockCrabs health is 9
    RockCrab hit 9
    your health is 37
    you hit 3
    RockCrabs health is 6
    RockCrab hit 4
    your health is 33
    you hit 2
    RockCrabs health is 4
    RockCrab hit 7
    your health is 26
    you hit 3
    RockCrabs health is 1
    RockCrab hit 6
    your health is 20
    Edited by: rade134 on Jun 4, 2009 10:58 AM

    [_Crosspost_|http://forums.sun.com/thread.jspa?threadID=5390217] I'm locking.

Maybe you are looking for

  • How to access the value of fiedl ( select list with redirect )

    WE created one report and form. When i click in the edit button of the report for the specific record ; the system go automatically in the form and show me all the information. In my form ia have some fields ( select list with redirect ) in this way

  • Clicking a picture in the list shows me a different picture

    When I view my album of images the preview will sometimes show me a picture I took recently but when I touch the preview it shows me an image from months ago that isn't even on my phone anymore. This happens very often, and is repeatable. Every time

  • JDev 10.1.3 how to invoke oc4j_remote_deploy.jar from command line?

    Hi, does anyone know how to invoke the JDev 10.1.3 oc4j_remote_deploy.jar from the command line? We have it working for 10.1.2, for automated deployment scripts. If I try the same thing for 10.1.3, I get an error. See below my command line and the ou

  • How do a migrate from a Wallstreet?

    I'd love to join the ranks of those delighted with their migration to a new OSX machine. In my case, it is proving a little more complex. My old PowerBook G3 Pismo (circa 1999) died suddenly (possibly from the loss of a heat-sensitive fuse, I'm told)

  • How to know what outlook profile is required?

    Hi, I'm changing my pc in this other pc I want to setup iCloud then firstly I setup my email account in Outlook now it is working fine,  but when I open iCloud and select contacts to be sincronized, I get an error message about "Outlook is not setup