JetBrains / JetBrains/JetBrainsRuntime

The setFilenameFilter of FileDialog is not working.

Open
#481 1 comment 0 reactions 0 assignees View on GitHub
Dominant language
Java
Stars
2k
Forks
269
Avg merge
1h 18m
Merged PRs (30d)
1

Description

I am using jbr 21.0.5 (jbrsdk-21.0.5-osx-aarch64-b631.28 && jbrsdk-21.0.5-osx-aarch64-b631.16)to develop a compose desktop application,and the name filtering of the file selector is not working.

Here is my code:

val dialog = FileDialog(Frame().apply { isVisible = true }, "img", FileDialog.LOAD).apply {
isMultipleMode = true
filenameFilter = FilenameFilter { _, name -> FileTypeUtils.isSupportImageType(name.split(".").last()) }
isVisible = true
}
dialog.files ....

Contributor guide

Open the contributing guide

Research direction

Start by reproducing the issue in a Compose desktop application on macOS with JBR 21.0.5, using the shown FileDialog and FilenameFilter setup. Compare the behavior of the two listed JBR builds and inspect the FileDialog filtering path. Done means supported image files are filtered correctly while selecting files.

Written by the indexing model from the issue text.

Assessment

Tech stack
java
Domain
desktop
Issue type
Bug
Difficulty
3/5
Estimated time
1-2 days
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
45/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.