1

I having trouble related to javafx filechooser component. In filechooser javafx doesn't provide a way to get selected extension type(file extension selected in save as dropdown). Same issue is also mentioned here. It is fixed in javafx 8 version. see here .it requires login. I am using javafx 2.2. Can somebody suggest a workaround for same using javafx 2.2?

Thanks!

Andrew Thompson
  • 168,117
  • 40
  • 217
  • 433
Neo
  • 165
  • 3
  • 11
  • What does this have to do with Swing? – Andrew Thompson Nov 29 '13 at 04:35
  • Well i thought some swing developer might have some useful info on this. – Neo Nov 29 '13 at 04:38
  • 1
    Why? And if so, why not toss AWT into the mix? If you want a `JFileChooser` use one and stop asking silly questions, otherwise there is really no connection. – Andrew Thompson Nov 29 '13 at 04:39
  • @AndrewThompson i can't use JFileChooser in my javafx application as javafx doesn't allow this...Its a perfectly valid question and there is connection too...its just that you are not getting it... – Neo Nov 29 '13 at 04:50

1 Answers1

0

It seems to be already implemented &/ or fixed. If what you exactly want is still no working for you with the latest javaFx version, than i guess you should use poj or apache commons:

The apache Commons library has FilenameUtils.getExtension() or maybe: Java getting file extension without substring


Community
  • 1
  • 1
4F2E4A2E
  • 1,964
  • 26
  • 28
  • 1
    thanks for the response @4F2E4A2E but what i require is different...In the filechooser dialog i need to get the extension selected in the save as type....he should not be required to specify the file extension...the application should get it from the save as type selected by user..and the fix is available in java 8 but i cant use javafx 8 ...so i need some other alternative... – Neo Dec 01 '13 at 07:16
  • Please post a snippet, thy! – 4F2E4A2E Dec 02 '13 at 08:50