本文整理汇总了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();
}