Undo/Redo button are not performing more than one operation at a time

Hi,
I have created undo/redo button on my paint application. But it performing only last action to undo.I have just the code which store offscreen image into undo buffer image like this :
    if (OSC == null || widthOfOSC != getSize().width || heightOfOSC != getSize().height) {
                 // Create the OSC, or make a new one if canvas size has changed.
             OSC = null;  // (If OSC & undoBuffer already exist, this frees up the memory.)
             undoBuffer = null;
             OSC = createImage(getSize().width, getSize().height);
             widthOfOSC = getSize().width;
             heightOfOSC = getSize().height;
             OSG = OSC.getGraphics();  // Graphics context for drawing to OSC.
             OSG.setColor(getBackground());              
             OSG.dispose();
             undoBuffer = createImage(widthOfOSC, heightOfOSC);
              OSG = undoBuffer.getGraphics();  // Graphics context for drawing to the undoBuffer.
              OSG.setColor(getBackground());            
              OSG.fillRect(0, 0,widthOfOSC, heightOfOSC);
               and the button performed it's action :
else if (command.equals("Undo")) {
             // Swap the off-screen canvas with the undoBuffer and repaint.
             Image temp = OSC;
             OSC = undoBuffer;
             undoBuffer = temp;
             repaint();I want to create undo button that performed end operation on canvas.
please help me
Thanks in advance....

Don't post the same question repeatedly. I've removed the thread you started 4 days after this one with the identical same question.
db

Similar Messages

  • My mac will not copy more than one file at a time and gets locked up if the file is too large, my mac will not copy more than one file at a time and gets locked up if the file is too large

    my mac will not copy more than one file at a time and gets locked up if the file is too large, my mac will not copy more than one file at a time and gets locked up if the file is too large

    So now that you have repeated the same thing three times that doesn't make things any clearer at all.
    You are copying files from where to where?
    How are you attempting to copy files, software or click and drag?
    Any other detail would be helpful.
    Allan

  • My HP Officejet 6500 E709a All-in-One will not print more than one copy at a time.

    My HP Officejet 6500 E709a All-in-One will not print more than one copy at a time.  This is especially disconcerting at Christmas time when you're trying to get Christmas letters in the mail!  Any help?

    The cyan portion of the printhead may be clogged.  I would suggest running the diagnostics shown here.  If three levels of cleaning of the printheads does not resolve the issue you may need a new printhead.
    Bob Headrick,  HP Expert
    I am not an employee of HP, I am a volunteer posting here on my own time.
    If your problem is solved please click the "Accept as Solution" button ------------V
    If my answer was helpful please click the "Thumbs Up" to say "Thank You"--V

  • K5400 will not print more than one page at a time.

    The K5400 Office Jet Pro will not print more than one at a time when I change the number of pages to print in Printing Preferences.  I have downloaded all the updates available and have tried many times.
    Using a Windows XP SP3 computer.
    Thank you, Marion

    Hi,
    The HP Deskjet 1050 All In One can perform multiple copies at a time. To perform a multiple copy, press the Copy Black or Copy Color button as many times as the copy is required. A maximum of 10 copies can be performed at a time.
    Please open the link below which illustrates the same.
    http://h10025.www1.hp.com/ewfrf/wc/document?docnam​e=c02459739&tmp_task=prodinfoCategory&lc=en&dlc=en​...
    If the issue persists then, please perform the steps as shown below and check the copying function again.
    Steps to perform a reset.
    Press the Power button ( ) to turn off the product.
    NOTE: The product might not turn off after pressing the Power button. Continue to the next step regardless.  
    Disconnect the power cord from the rear of the product.
    Disconnect the power cord from the electrical outlet.
    Wait 30 seconds.
    Reconnect the power cord to the electrical outlet.
    Reconnect the power cord to the rear of the product.
    Press the Power button ( ) to turn on the product.
    Connect the unit directly to a wall outlet.
    Check the copying function now.
    I hope this resolves the issue, if the error persists then please get back to us.

  • Hp 1050 will not print more than one copy at a time

    hp 1050 will not print more than one copy at a time

    Hi,
    The HP Deskjet 1050 All In One can perform multiple copies at a time. To perform a multiple copy, press the Copy Black or Copy Color button as many times as the copy is required. A maximum of 10 copies can be performed at a time.
    Please open the link below which illustrates the same.
    http://h10025.www1.hp.com/ewfrf/wc/document?docnam​e=c02459739&tmp_task=prodinfoCategory&lc=en&dlc=en​...
    If the issue persists then, please perform the steps as shown below and check the copying function again.
    Steps to perform a reset.
    Press the Power button ( ) to turn off the product.
    NOTE: The product might not turn off after pressing the Power button. Continue to the next step regardless.  
    Disconnect the power cord from the rear of the product.
    Disconnect the power cord from the electrical outlet.
    Wait 30 seconds.
    Reconnect the power cord to the electrical outlet.
    Reconnect the power cord to the rear of the product.
    Press the Power button ( ) to turn on the product.
    Connect the unit directly to a wall outlet.
    Check the copying function now.
    I hope this resolves the issue, if the error persists then please get back to us.

  • LaserJet 5000 will not print more than one copy at a time.

    We have recently moved our office.  A LaserJet 5000 which is used as an office printer is shared through one of the computers on the network in the exact same way it was more we moved.  But since the move it will not print multiple copies of the same document no matter how many copies the software tells the printer to print it will only print one copy then it stops.  Before the moved it worked fine.  If the software program such as Word told it to print 100 copies it printed 100 copies now one is the limit.   So if you want to printmore than one you have to hit print that many times.  It has 172 MB RAM.  Does anyone have any ideas of what might have happened????

    I have the same issue with a photosmart 2410xi. Did you ever get yours figured out?

  • ITunes is not downloading more than one Podcast at a time.

    Since two updates ago, when I select multiple podcasts and update them to download the latest episodes, iTunes will only download one at a time.  It will show multiple in the "Downloads" window, but it will only actually download them one at a time.  The "Allow Simultaneous Downloads" box is checked, and I have uninstalled and reinstalled iTunes.

    Anomander Rake wrote:
    If the box is checked, what happens is it will show 3 podcasts have started (by showing the progress bar), however only the first one actually downloads anything. Once it finishes, the second podcast will start actually downloading (and one new one will show that the download progress bar, tho it remains empty until its the "top" podcast. Like it doesnt do anything until everything above it has already finished.
    That sounds like a classic case of the Podcast provider limiting the number of simultaneous downloads to one only. As I asked the original poster; are these Podcasts from the same programme, or even from the same radio station network?
    Anomander Rake wrote:
    And thats annoying enough, but sorta often... if the first podcast takes too long the lower podcasts that have shown the progress bar but not actually started downloading yet will time out and not download until I tell it to try again.
    Again, classic symptoms of a Podcast provider limiting the number of simultaneous downnloads. Although this isn't proof, that it's the provider, the question needs to be asked.
    I find it extrememly unlikely that cmhogan's suggestion would give you any different results, because the request is simply made in a different way, the queue is the same.

  • Why I can not connect more than one device at a time with a monthly subscription?

    Yesterday I bought a monthly subscription (https://store2.adobe.com/cfusion/store/html/index.cfm?store=OLS-ES&event=displayProduct&ca tegoryPath=/Applications/EdgeInspect) and I got the confirmation of the purchase but I recognize Google Chrome I have synchronized devices but then only see one at a time, not displayed on all at once, can you help me?
    Thanks in advance.
    Message was edited by: dpcani_marble

    Good afternoon where should be logged? In Chrome I'm logged in adobe.creative.com and many times I restarted Chrome and still not working ...

  • Finder will not copy more than one file at a time to another folder

    The Finder can’t complete the operation because some data in “EMAP_14_map.pdf” can’t be read or written.
    (Error code -36)

    The startup drive is failing, or there is some other internal hardware fault.
    Back up all data on the drive immediately if you don't already have a current backup. There are ways to back up a computer that isn't fully functional—ask if you need guidance.
    Make a "Genius" appointment at an Apple Store, or go to another authorized service provider.
    If privacy is a concern, erase the data partition(s) with the option to write zeros* (do this only if you have at least two complete, independent backups, and you know how to restore to an empty drive from any of them.) Don’t erase the recovery partition, if present.
    Keeping your confidential data secure during hardware repair
    Apple also recommends that you deauthorize a device in the iTunes Store before having it serviced.
    *An SSD doesn't need to be zeroed.

  • Is there a way to reset more than one image at a time?

    I have a folder with 1100 images taken on four different cameras. I have a new default setting for one of the cameras that I would like to apply to most but not all of the images in this folder. I could remove the offending images and reimport, I could filter by serial number and sync a preset. It would be easier, however, if could just select the images I want and hit the reset tool and reset all the images selected. But it only seems to reset the dominant image. Any way to get the reset button to work on more than one image at a time?
    Gordon

    do it in Grid not Filmstrip or Develop.
    Don
    Don Ricklin, MacBook 2Ghz Duo 2 Core running 10.5.1 & Win XP, Pentax *ist D See LR Links list at http://donricklin.blogspot.com for related sites.

  • How do you select and move more than one bookmark at a time? Shift+Click does not select multiple items that are next to one another in a list because the item

    How do you select and move more than one bookmark at a time?
    Shift+Click does not select multiple items that are next to one another in a list because the items open in firefox before this happens.

    Use the bookmarks library. You may use Shift +Click, and Ctrl + Click to create groupings of selected bookmarks to drag and drop.
    * one method of opening the bookmarks library is keyboard shortcut <br /> Ctrl+Shift+B (Windows)
    *see also [[How to use bookmarks to save and organize your favorite websites]]
    *and [[Use bookmark folders to organize your bookmarks]]

  • IAC 3.1.1 users who are member of more than one OrgUnit are not able to order services?

    Hi,
    Power Down, Power Cycle, Take Snapshot and Decommission services are not working for users who are member of more than one organization!!
    Error Message:
    The service form could not be submitted because of following error: [newscale][SQLServer JDBC Driver][SQLServer]Conversion failed when converting the nvarchar value '1,2' to data type int.
    Thanks,
    Maz

    Hi,
    Power Down, Power Cycle, Take Snapshot and Decommission services are not working for users who are member of more than one organization!!
    Error Message:
    The service form could not be submitted because of following error: [newscale][SQLServer JDBC Driver][SQLServer]Conversion failed when converting the nvarchar value '1,2' to data type int.
    Thanks,
    Maz

  • Perform VENDOR EVALUATION for MORE THAN ONE VENDORS at a time

    Hello all,
    Please guide for any process where i can perform Vendor Evaluation for MORE THAN ONE vendors AT A TIME.
    At my location there are around thousand vendors, which are to be evaluated, and difficult to perform the evaluation process one-by-one.
    (ME61/ME62/ME63)
    Detailed replies with various possibilities would be highly appreciated.
    Thanks & Regards,
    Joy Ghosh

    The vendor evaluation for some thousand vendors at the same time has already been in SAP long before they developed LSMW. The purpose of LSMW is to load data from a legacy system, of course you can (mis-)use it for a lot other things.
    But you should not always use LSMW if you are to lazy to go thru the SAP standard menu to find a transaction like ME6G
    There you define a job that runs RM06LBAT report.
    You first have to define a selection variant for this report. this can be done in SE38 by entering the report name, select variant, clicking display, then entering a name for the variant and clicking Create.

  • When I open an event, including flagged items, the photos appear one by one, not as thumbnails, so I can't export more than one phot at a time. How do I get iPhoto to show the thumbnails?

    When I open an event, including flagged items, the photos appear one by one, not as thumbnails, so I can't export more than one phot at a time. How do I get iPhoto to show the thumbnails?
    I've tried rebuilding the thumbnail database, but that hasn't helped.

    What version of iPhoto and system are you running?
    Try moving the Zoom slider at the bottom of the iPhoto window all the way to the left.  Does that let more than one photo display in the window?
    OT

  • TS2755 Ever since I updated my iphone 4 to 5.1.1, I am not able to send more than one picture at a time in a text message. Does anyone know how to fix this?

    Ever since I updated my iphone 4 to 5.1.1, I am not able to send more than one picture at a time in a text message. Does anyone know how to fix this?

    Yes, I know the photos stored on the device... But which app are you accessing the photos with? Which app do you want to be able to highlight more than one pic at a time in?
    There are literally thosands of apps that access the iOS Photo Library - which one(s) are you using?

Maybe you are looking for