filechooser

Refresh / Reload FileChooser

℡╲_俬逩灬. 提交于 2021-02-08 07:31:57
问题 Currently I'm working with FileChooser a lot and I didn't find any mention of refreshing the widget in the docs. The widget is awesome, but if someone wants to refresh shown files, a movement from current directory is necessary to refresh files. The problem is when you have a single directory as a rootpath and inside are only files, therefore no such movement is possible. My question was how to refresh the widget if I want to avoid any wasteful removing/adding of FileChooser and do it as

Refresh / Reload FileChooser

ぐ巨炮叔叔 提交于 2021-02-08 07:30:54
问题 Currently I'm working with FileChooser a lot and I didn't find any mention of refreshing the widget in the docs. The widget is awesome, but if someone wants to refresh shown files, a movement from current directory is necessary to refresh files. The problem is when you have a single directory as a rootpath and inside are only files, therefore no such movement is possible. My question was how to refresh the widget if I want to avoid any wasteful removing/adding of FileChooser and do it as

How to restrict a JFileChooser to a custom file type? [closed]

大憨熊 提交于 2021-02-05 12:28:14
问题 Closed. This question does not meet Stack Overflow guidelines. It is not currently accepting answers. Want to improve this question? Update the question so it's on-topic for Stack Overflow. Closed 5 years ago . Improve this question I am having slight trouble with JFileChooser . I want to restrict to only read certain kind of files. Another stack answer recommended using a FileNameExtensionFilter , but this doesn't seem to be working. This might be because I have to restrict it to a custom

Can't open file from intent in Android 10

拟墨画扇 提交于 2021-01-05 09:15:22
问题 I'm trying to access a file from Intent.ACTION_GET_CONTENT, when I try it on my device (which is Android 8), it works perfectly fine. But then, when I try it on my friends' device (Android 10), it's not working. When I try to open the file from Word it keeps say that "Can't open file. Try saving the file on the device and then opening it." And when I open a pdf file, it doesn't show anything, just black screen. btn_add OnClick Listener btn_add.setOnClickListener(new View.OnClickListener() {

JavaFX FileChooser

。_饼干妹妹 提交于 2020-08-20 18:28:57
问题 I came across a little problem now with JavaFX. I tried to make a filechoosing in my code where I can point on a FOLDER instead of a file. Currently I don't have a solution for it. Do you know a workaround (except using JFileChooser from swing)? Many thanks for the answers in advance edit: I already got now an answer, trying to test it, but I forgot to mention the version of JavaFX. It is the latest 2.0.3 stable here, released a few days ago (but the initial non-beta 2.0 and 2.0.1 had this

JavaFX FileChooser

一笑奈何 提交于 2020-08-20 18:27:52
问题 I came across a little problem now with JavaFX. I tried to make a filechoosing in my code where I can point on a FOLDER instead of a file. Currently I don't have a solution for it. Do you know a workaround (except using JFileChooser from swing)? Many thanks for the answers in advance edit: I already got now an answer, trying to test it, but I forgot to mention the version of JavaFX. It is the latest 2.0.3 stable here, released a few days ago (but the initial non-beta 2.0 and 2.0.1 had this

Simple Android Directory picker - How?

拜拜、爱过 提交于 2020-05-24 21:13:05
问题 I have just started coding in Android Studio and feeling Awesome..!! How can I write a code for a 'Directory Picker'. i.e., When a button is clicked, a simple Dialog/Activity screen which can show list of directories. Also, want to store all the files in that directory in to an Array variable. (Once OK button is clicked). PS: I have searched here and found some cool 'File choose' but m looking for Directory Chooser..! Thanks in advance. 回答1: Try to use Intent.ACTION_OPEN_DOCUMENT_TREE if

JavaFX FileChooser Filefilter not returning extension

微笑、不失礼 提交于 2020-02-06 03:41:57
问题 In my project I use JavaFX FileChooser to let the user save files. I noticed a bug, where a file with a specified file filter would always save as a .txt on Linux systems. From another stackoverflow thread I leaned that unlike Windows, on Linux the fileChooser.showSaveDialog(); returns a file without the chosen file extension. I am confident, that this irregular implementation has a very obvious cause that I am not understanding. But still I am not sure how to adapt this for my needs. I am

Custom file picker without using <input type=“file”/>

邮差的信 提交于 2020-01-04 06:26:08
问题 I am working on a java-based (webwork framework) web-app where the file to be uploaded needs to be compressed first. Since there's no way to set the value of "input type='file'" element via javascript, I decided to take the route of an embedded applet. Basically this applet compresses the chosen file, then uploads the compressed file to the server via scp. It worked well, but I have issues regarding the rendering of the web page itself. I am thinking instead of implementing the file picker

Choose local video and play it in HTML5 videoplayer (all local, same folder)

为君一笑 提交于 2020-01-02 07:18:13
问题 for school I need to use a HTML5 videoplayer with extra controls and the option to choose a file from local drive. The page runs local, too. So it is not uploaded. The files (HTML and video) are in the same local folder. For the choose-thing I use a form with <form><input type="file" id="chosen" /><button type="submit" onclick="open();">Change</button></form> . Now here is my JavaScript that should manipulate the source of the videoplayer: function open() { var file=document.getElementById(