/** * @param control * @param string * @param model2 * @param rootFile */ public PathInfoControl( IControlContainer container, String name, DirectoryModel model, File root) { super(container, name); this.model = model; this.root = root; txtPath = new InputBox(this, "txtPath"); txtPath.setWidth(500); txtPath.setListenKeyCode(13); // Listen to the ENTER key txtPath.addKeyListener( new KeyListener() { public void keyPressed(de.jwic.events.KeyEvent event) { gotoPath(txtPath.getText()); }; }); LabelControl lblPath = new LabelControl(this, "label"); lblPath.setText("Path:"); Button btGo = new Button(this, "btGo"); btGo.setTitle("Go there"); btGo.addSelectionListener( new SelectionListener() { public void objectSelected(SelectionEvent event) { gotoPath(txtPath.getText()); } }); updatePath(); model.addPropertyChangeListener(this); }