On Tue, 10 Mar 2026 18:50:11 GMT, Andy Goryachev <[email protected]> wrote:
>> I'd say the existing behavior is unexpected and wrong. The use case where
>> FileChooser is used to save or open file(s) should not require the
>> application to invent additional code to handle transient directories, a
>> quite possible scenario.
>>
>> For instance, Swing `JFileChooser` ignores the non-existent currentDirectory
>> and just uses the JVM's current one.
>>
>>
>> public static void main(String[] args) throws Throwable {
>> // enableLogging();
>> //Application.launch(TreeView_Focus_8256142.class, args);
>> EventQueue.invokeLater(AppTestLauncher::run);
>> }
>>
>> private static void run() {
>> JFrame f = new JFrame();
>> f.setSize(100, 100);
>> f.setVisible(true);
>>
>> JFileChooser c = new JFileChooser(new File("/blah"));
>> c.showOpenDialog(f);
>> }
>
> what do other people think? @hjohn @mstr2 @nlisker @crschnick
That's a fair point. Let's continue the discussion. I am not opposed to
changing the behavior as long as we've thought through all the consequences.
-------------
PR Review Comment: https://git.openjdk.org/jfx/pull/2101#discussion_r2914156143