Solved

How to  UNDO  a function in java

Posted on 2003-11-14
5
246 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
  • 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: Port Scanner

Check which ports are open to the outside world. Helps make sure that your firewall rules are working as intended.

One of a set of tools we are providing to everyone 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

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…
Introduction This article is the first of three articles that explain why and how the Experts Exchange QA Team does test automation for our web site. This article explains our test automation goals. Then rationale is given for the tools we use to a…
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…
Viewers will learn about basic arrays, how to declare them, and how to use them. Introduction and definition: Declare an array and cover the syntax of declaring them: Initialize every index in the created array: Example/Features of a basic arr…

820 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