Questions tagged [filechooser]

A GUI component that allows to navigate over the file system, selecting files and folders of interest.

Usually file chooser is similar to the file explorer. It allows to navigate over the file system, selecting files and folders of interest or to specify yet non-existing files in the existing folder ("Save as").

File chooser can often be configured to show only set of selected file types, allow or disallow multiple selection and allow or disallow selection of folders rather than files.

This component is present in libraries of many languages.

472 questions
0
votes
0 answers

JavaFX: usage of swing jfilechooser

Firstly, I am aware that my question may take some flak because JavaFX has its own FileChooser (that is largely superior/preferable to Swing's JFileChooser) and that mixing FX and Swing should be dissuaded. However - I will explain the functionality…
smokinjim
  • 5
  • 1
0
votes
0 answers

Uploading an image automatically to a folder using FileChooser using JavaFX

First post by a newbi - please be gentle :) I'm currently writing a database of vehicles in a museum. I am able to save it as XML. However I recently tried adding images of the vehicles into the database via a dialogStage which worked well until I…
Maverick
  • 1
  • 1
0
votes
1 answer

how to auto-select source file when build a install packet

i have the following requirement: two folders A and B, for file a, if it exists in A, we build it into our install packet, otherwise we use file a in folder B as the default selection. how to implement this? please help.
Dafan
  • 1,186
  • 1
  • 11
  • 14
0
votes
0 answers

Using FileChooser to open user file path and filter by extensions

I am new to GUI coding in Java. My program needs to accept a file path entered by the user via a JTextField. The user can then select one of four JCheckBoxes that correlate to a certain file extension filter. When the user presses a button, the file…
0
votes
2 answers

Groovy/Java - File-chooser not using the JavaFX or Event threads?

I'm developing an app which for some time will probably just use the command line. It may one day be appropriate to give it the whole JavaFX visual treatment: windows, dialogs, etc. What I do currently need to do is allow the users to select…
mike rodent
  • 14,126
  • 11
  • 103
  • 157
0
votes
1 answer

File path in real device shows wrong path

In my class, I use the following method to get the file path, but it works only on the emulator; why? My problem is with the real device (Samsung Galaxy j5): The files in the internal hard:Encounter with Exception. The files in the external hard:…
HajAli
  • 49
  • 8
0
votes
1 answer

How to force HTML input file chooser to give the original file name in Ionic(Android)?

I am using HTML input for choosing file in my Ionic3/Angular application. I am using below code: // in .html file // in .ts file onFileChoose($event): void { …
Setu Kumar Basak
  • 11,460
  • 9
  • 53
  • 85
0
votes
1 answer

JavaFX FileChooser throws NullPointerException when called

I am having a problem opening a FileChooser in JavaFX as it throws an error when i call showOpenDialog(...) method, i searched for similar threads like the link i posted below but couldn't make it work. The error is thrown when i call the addHtml()…
DJava
  • 11
  • 5
0
votes
1 answer

JTextArea shows up but for further action on it I receive empty

I have a class "MainFrame1" that extends a JFrame and also another class that is a file chooser. Whenever I press one of the JMenuItems in MainFrame1 class, I want the file chooser to open up and load up the text of the chosen file on a JTextArea…
Laura
  • 1
  • 3
0
votes
2 answers

Get all Extensions of the ExtensionFilters of a FileChooser

I want to add an ExtensionFilter (supported Files) in the end with all the extensions of the previous filters to a FileChooser. This is what I've tried: FileChooser chooser = new FileChooser(); chooser.getExtensionFilters().addAll( new…
user8491933
0
votes
1 answer

Kivy popup Filechooser pass variable (selection)

i want to pass selection variable from load_file_popup filechooser to GUI. when i press load button after selecting a file it gives error TypeError: 'NoneType' object is not callable Here is my code (simplified) class GUI(BoxLayout): …
user8694101
0
votes
1 answer

onActivityResult the image uri not work

i try from a cordova plugin to return an image taken from the camera. The image is saved and exists, when I return the array of uri with the uri of the image, I retrieve nothing. If i take from gallery it works, the code in the "onActivityResult"…
0
votes
1 answer

How to scan only dis,flt files

I want to use only with JFileChooser I need to scan only dis,flt files: I have code like this: JFileChooser chooser = new JFileChooser(); FileNameExtensionFilter xmlfilter = new FileNameExtensionFilter( "dis files (*.dis)",…
Help
  • 13
  • 1
0
votes
0 answers

How to wait for user imput and return value in Java?

I want to let my user choose an Icon from a list of icons and I'm on the edge of being done, but I was looking at JFileChooser and JDialog and I was wondering how they do things like : chooser.showOpenDialog(); which returns…
Alde
  • 428
  • 1
  • 5
  • 20
0
votes
2 answers

Open the chooser for PDF before the actual PDF opens

currently, I'm trying to open my pdf files with a chooser. The problem I'm currently having is that the file tries to open before the chooser is visible. Only when I go back from the opened file I can see the chooser and choose my favorite…