Solved

How to  UNDO  a function in java

Posted on 2003-11-14
5
247 Views
Last Modified: 2010-03-31
I need to have a UNDO function in java using the (CONTROL and Z )key pressed.
Please try to give the solution because it is quite so important to me.
0
Comment
Question by:ashok3sep
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
  • 2
5 Comments
 
LVL 35

Expert Comment

by:TimYates
ID: 9746640
0
 
LVL 5

Author Comment

by:ashok3sep
ID: 9746957
But i want to undo all the previous operation not text element but also if i make any changes in my diagram.
0
 
LVL 35

Accepted Solution

by:
TimYates earned 50 total points
ID: 9747015
http://www.javaworld.com/javaworld/jw-06-1998/jw-06-undoredo.html

Shows how to use the UndoManager with a list...  

Basically, each operation the user performs has to be a class that extends AbstractUndoableEdit.  It is up to you to provide the implementations that say whether an operation can be undone, what happens when it is undone, and how it can be redone...

The applet doesn't work on that page, but the code is valid :-)

Tim.
0

Featured Post

Free Tool: Path Explorer

An intuitive utility to help find the CSS path to UI elements on a webpage. These paths are used frequently in a variety of front-end development and QA automation tasks.

One of a set of tools we're offering as a way of saying thank you for being a part of the community.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Suggested Solutions

Title # Comments Views Activity
Android development question 2 109
Desingning Refactoring existing code 2 46
dao vs facade design patterns 2 71
Tomcat 9 + java 8 error while trying to deploy a war file 2 856
After being asked a question last year, I went into one of my moods where I did some research and code just for the fun and learning of it all.  Subsequently, from this journey, I put together this article on "Range Searching Using Visual Basic.NET …
This was posted to the Netbeans forum a Feb, 2010 and I also sent it to Verisign. Who didn't help much in my struggles to get my application signed. ------------------------- Start The idea here is to target your cell phones with the correct…
Viewers will learn about arithmetic and Boolean expressions in Java and the logical operators used to create Boolean expressions. We will cover the symbols used for arithmetic expressions and define each logical operator and how to use them in Boole…
The viewer will learn how to implement Singleton Design Pattern in Java.
Suggested Courses

739 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question