I would like to use native filechooser in a swing application
I am using swt for this now but I can not use 1.5Mb+ for this so I tried to remove the unnecessary classes to minimize the size but i just can get rid of .5Mb, is there another solution(I think that can done by JNI but i do not know much about)
Thanks in advance.
Calling native filechooser from javaUsing native file choser from java
Page 1 of 1
6 Replies - 5227 Views - Last Post: 16 February 2008 - 05:30 PM
Replies To: Calling native filechooser from java
#2
Re: Calling native filechooser from java
Posted 16 February 2008 - 02:15 PM
I'm sure there's a way to call a file open dialog with jni, but I the file opener I wrote took 4KB when compiled.
[edit] actually, it opened AND saved files.
[edit] actually, it opened AND saved files.
This post has been edited by GWatt: 16 February 2008 - 02:15 PM
#3
Re: Calling native filechooser from java
Posted 16 February 2008 - 02:42 PM
#4
Re: Calling native filechooser from java
Posted 16 February 2008 - 04:42 PM
I would suggest using JNA (a simplified JNI), it might be easier, but I'm not sure how big the needed jars are.
#5
Re: Calling native filechooser from java
Posted 16 February 2008 - 05:04 PM
#6
Re: Calling native filechooser from java
Posted 16 February 2008 - 05:24 PM
I did mine as part of a sudoku solver, so it's pretty simplistic.
Anyway, I inherited from JFileChooser in the javax.swing package. If you have java 6 you can use FileNameExtensionFilter in conjunction with JFileChooser. IF you have java 5 or previous, just write your own name filter. It's pretty easy, and small. I'd post my code, except for the site policy. Sorry if that seems over cautious.
Anyway, I inherited from JFileChooser in the javax.swing package. If you have java 6 you can use FileNameExtensionFilter in conjunction with JFileChooser. IF you have java 5 or previous, just write your own name filter. It's pretty easy, and small. I'd post my code, except for the site policy. Sorry if that seems over cautious.
#7
Page 1 of 1
|
|

New Topic/Question
Reply




MultiQuote





|