aboutsummaryrefslogtreecommitdiff
path: root/libjava/javax/swing/text/TextAction.java
diff options
context:
space:
mode:
Diffstat (limited to 'libjava/javax/swing/text/TextAction.java')
-rw-r--r--libjava/javax/swing/text/TextAction.java8
1 files changed, 6 insertions, 2 deletions
diff --git a/libjava/javax/swing/text/TextAction.java b/libjava/javax/swing/text/TextAction.java
index 5fee0e8..029eed9 100644
--- a/libjava/javax/swing/text/TextAction.java
+++ b/libjava/javax/swing/text/TextAction.java
@@ -54,7 +54,7 @@ public abstract class TextAction extends AbstractAction
*/
public TextAction(String name)
{
- // TODO
+ super(name);
}
/**
@@ -64,7 +64,11 @@ public abstract class TextAction extends AbstractAction
*/
protected final JTextComponent getTextComponent(ActionEvent event)
{
- return null; // TODO
+ if (event.getSource() != null &&
+ event.getSource() instanceof JTextComponent)
+ return (JTextComponent) event.getSource();
+ else
+ return getFocusedComponent();
}
/**