0

i'm writing a program that manage the photos and there is a button that open a file chooser this program allow just the files with extension *.png so iwant to determine if the selected file is not with extension*.png do something. How i can do so and thanks very much

Zerro
  • 13
  • 2
  • 4
  • Can you clarify? Do you want the user to be able to select other file types? If not, just use an [`ExtensionFilter`](http://docs.oracle.com/javase/8/javafx/api/javafx/stage/FileChooser.ExtensionFilter.html). – James_D Jun 30 '15 at 13:21
  • yes the user can't open selected file with an other extension just with "*.png" – Zerro Jun 30 '15 at 13:23
  • Isn't it the same question as this? http://stackoverflow.com/q/31099524/4170073 – aw-think Jun 30 '15 at 13:25
  • possible duplicate of [JavaFX 2.2 Get selected file extension](http://stackoverflow.com/questions/20637865/javafx-2-2-get-selected-file-extension) – aw-think Jun 30 '15 at 13:27
  • 1
    So then what are you asking? If the user cannot select a file that doesn't have the .png extension, then if a file is selected it must have the .png extension. What is there to determine? – James_D Jun 30 '15 at 13:31

0 Answers0