3 import javajs.awt.Container;
5 public abstract class JComponent extends Container {
7 protected boolean autoScrolls;
8 protected String actionCommand;
9 protected Object actionListener;
11 protected JComponent(String type) {
15 public void setAutoscrolls(boolean b) {
20 * Note that it will be the job of the JavaScript on the
21 * page to do with actionListener what is desired.
23 * In javax.swing, these methods are in AbstractButton, but
24 * this is better for javajs.swing, reducing the duplication
25 * of JTextField's actionListener business.
30 public void addActionListener(Object listener) {
31 actionListener = listener;
34 public String getActionCommand() {
38 public void setActionCommand(String actionCommand) {
39 this.actionCommand = actionCommand;