本文整理匯總了Java中javax.swing.undo.CannotUndoException.printStackTrace方法的典型用法代碼示例。如果您正苦於以下問題:Java CannotUndoException.printStackTrace方法的具體用法?Java CannotUndoException.printStackTrace怎麽用?Java CannotUndoException.printStackTrace使用的例子?那麽, 這裏精選的方法代碼示例或許可以為您提供幫助。您也可以進一步了解該方法所在類javax.swing.undo.CannotUndoException
的用法示例。
在下文中一共展示了CannotUndoException.printStackTrace方法的5個代碼示例,這些例子默認根據受歡迎程度排序。您可以為喜歡或者感覺有用的代碼點讚,您的評價將有助於係統推薦出更棒的Java代碼示例。
示例1: actionPerformed
import javax.swing.undo.CannotUndoException; //導入方法依賴的package包/類
public void actionPerformed(ActionEvent e) {
try {
undo.undo();
} catch (CannotUndoException ex) {
System.out.println("Unable to undo: " + ex);
ex.printStackTrace();
}
update();
redoAction.update();
}
示例2: actionPerformed
import javax.swing.undo.CannotUndoException; //導入方法依賴的package包/類
public void actionPerformed(ActionEvent e) {
try {
undo.undo();
} catch (CannotUndoException ex) {
Util.debug("Unable to undo: " + ex);
ex.printStackTrace();
}
update();
redoAction.update();
}
示例3: actionPerformed
import javax.swing.undo.CannotUndoException; //導入方法依賴的package包/類
public void actionPerformed(final ActionEvent e) {
if (!undoMngr.canUndo())
return;
try {
undoMngr.undo();
} catch (final CannotUndoException ex) {
ex.printStackTrace();
}
updateUndoState();
redoAction.updateRedoState();
}
示例4: undoLastAction
import javax.swing.undo.CannotUndoException; //導入方法依賴的package包/類
/**
* Attempt to undo an "action" done in this text area.
*
* @see #redoLastAction()
*/
public void undoLastAction() {
// NOTE: that the try/catch block shouldn't be necessary...
try {
if (undoManager.canUndo()) {
undoManager.undo();
}
}
catch (CannotUndoException cre) {
cre.printStackTrace();
}
}
示例5: actionPerformed
import javax.swing.undo.CannotUndoException; //導入方法依賴的package包/類
public void actionPerformed(ActionEvent e) {
try {
//undo.undo();
} catch (CannotUndoException ex) {
System.out.println("Unable to undo: " + ex);
ex.printStackTrace();
}
update();
//redoAction.update();
}