# Javafx File Workflows Search

> Build JavaFX file choosers, directory watches, import/export flows, and desktop search interfaces safely.

- Skill: `johannesrabauer/javafx-file-workflows-search` (Agent Skill)
- Install (CLI): `npx skillmds@latest add johannesrabauer/javafx-file-workflows-search`
- Raw SKILL.md: https://api.skillmd.com/api/skills/johannesrabauer/javafx-file-workflows-search/raw
- Safety review: pending
- Works with: Claude Code, Claude.ai, OpenAI Codex
- Category: Coding & Dev Tools
- Author: JohannesRabauer (https://skillmd.com/u/johannesrabauer)
- Updated: 2026-09-22
- Page: https://skillmd.com/skills/johannesrabauer/javafx-file-workflows-search

---


# JavaFX File Workflows and Search

Use this skill when the application is file-centric: open/save flows, directory watching, CSV or
structured imports, or desktop search and indexing tools.

## Example

```java
import java.io.File;
import javafx.collections.FXCollections;
import javafx.collections.transformation.FilteredList;
import javafx.scene.control.ListView;
import javafx.scene.control.TextField;
import javafx.scene.layout.BorderPane;
import javafx.stage.FileChooser;
import javafx.stage.Window;

public class FileSearchView extends BorderPane {

    private final FilteredList<String> files = new FilteredList<>(
            FXCollections.observableArrayList("report.csv", "notes.txt", "summary.json"),
            file -> true
    );

    public FileSearchView(Window owner) {
        var query = new TextField();
        query.setPromptText("Filter files");
        query.textProperty().addListener((obs, oldValue, newValue) ->
                files.setPredicate(name -> name.toLowerCase().contains(newValue.toLowerCase()))
        );

        var list = new ListView<>(files);
        var chooser = new FileChooser();
        chooser.setTitle("Open File");

        list.setOnMouseClicked(event -> {
            if (event.getClickCount() == 2) {
                File selected = chooser.showOpenDialog(owner);
                if (selected != null) {
                    files.getSource().add(selected.getName());
                }
            }
        });

        setTop(query);
        setCenter(list);
    }
}
```

## Setup notes

- Keep scanning, indexing, and directory watch work off the FX thread.
- Make file permissions, missing paths, and parse errors visible in the UI rather than silently skipping them.
- Use focused libraries such as FXFileChooser or LiveDirsFX when the file workflow itself is a core feature.

## Gotchas

- Large directories and search results need incremental loading or virtualization.
- File-system state changes can invalidate current selections unexpectedly.
- Import/export flows are product workflows, not just button handlers.

