FileDialog file extension problem
Hi,
How to show the FileDialog with specific extensions only. Like, needed extensions are put in a string array.
String[] extensions = {"doc","docx","xls","xlsx"};I need to show the filedialog with these extensions only.
Thanks in advance,
Joe
jomon_0012 wrote:
..How to show the FileDialog.. Why use FileDialog, or any of the AWT components for that matter, in this day and age?
..with specific extensions only. Like, needed extensions are put in a string array.
String[] extensions = {"doc","docx","xls","xlsx"};
See [FileDialog.setFilenameFilter(FilenameFilter)|http://java.sun.com/javase/6/docs/api/java/awt/FileDialog.html#setFilenameFilter(java.io.FilenameFilter)] ..
I need to show the filedialog with these extensions only...but note the bit that starts with.. "Filename filters do not.."
The JFileChooser file types functionality works just fine, as does the file dialog used by the JNLP API of Java Web Start. Use one of them instead.
Thanks in advance,No worries.
Similar Messages
-
Photoshop CS6 file extension problem
I want to choose an file extension in the "Save as" Dialog. If i choose Jpeg, Photoshop takes EPS and so on. Systemupdate and reinstall PS does not help.
My System: Mac OS X 10.6.8Boilerplate-text:
Are Photoshop and OS fully updated?
As with all unexplainable Photoshop-problems you might try trashing the prefs (after making sure all customized presets like Actions, Patterns, Brushes etc. have been saved and making a note of the Preferences you’ve changed) by keeping command-alt-shift pressed on starting the program or starting from a new user-account.
System Maintenance (repairing permissions, purging PRAM, running cron-scripts, cleaning caches, etc.) might also be beneficial, Onyx has been recommended for such tasks.
http://www.apple.com/downloads/macosx/system_disk_utilities/onyx.html
Weeding out bad fonts never seems to be a bad idea, either. (Validate your fonts in Font Book and remove the bad ones.)
If 3rd party plug-ins are installed try disabling them to verify if one of those may be responsible for the problem. -
Hello there everyone... My company is equipped with mac's an pc's and a pc server using windows 2000 server. The server 'died' and we bought a new one with windows sbs 2008, our files that were created by our mac computers were stored on the old server so we copied them back to the new one. The problem is that now when we try to access them some files that don't have extensions we can not open them as we don't know what they are, i.e in the same folder I had files that were tiff,jpeg,quark,pdf when I try to access them there are no extensions so I don't know with what program to open each file. These files are grey or black and are reffered to as Unix Executable File. Is there a way to get the mac systems to re-read the files correctly??? Our mac os is 10.4 and 10.5 and our server uses Windows SBS 2008!
I'd be worried about these files. You may have lost metadata as BD suggests.
Maybe your server administrator should look at copying mac file data or how to turn on the serving of Mac files. ( I'd guess it was an option in windows 2000. )
Can't you take a guess from the name what the application would have been?
Start the appropriate application & use file > open.
There is also the Terminal file command which will look inside a file & take a best guess at the contents of the file. Many files have an identifier in the first four characters of the file telling what type of data the file contains.
Macintosh-HD -> Applications -> Utilities -> Terminal
mac $ file /Users/mac/Desktop/ciruit.rtf
/Users/mac/Desktop/ciruit.rtf: Rich Text Format data, version 1, Apple Macintosh
mac $ file /Users/mac/Desktop/Lunch\ picture.JPG
/Users/mac/Desktop/Lunch picture.JPG: JPEG image data, EXIF standard
mac $
what you do is type file followed by a space. No need to type out the file path &name. Drop the file you wish to identify onto the terminal window. Press return after the drop.
you can also list the entire contents of a folder by the command:
file *
What you would do in this case is to use the cd command to move to the folder you want:
cd
then drag the folder you want to see & drop it on the terminal window. Press return after the drop.
Here is an overview of the terminal commands. Lets assume that your account has a short user name of mac.
Macintosh-HD -> Applications -> Utilities -> Terminal
#How to list all of your disks.
# The ls command is for list
mac $ ls /Volumes/
Audio CD Macintosh-HD Spotless Tiger-ext
mac $
# Let's say your flash drive is named Spotless
# cd is change directory
mac $ cd /Volumes/Spotless
# pwd is print working directory
mac $ pwd
/Volumes/Spotless
mac $
# The ls command is for list
# l is long
# F is type of file where / is directory
mac $ ls -lF
total 134704
-rw-r--r-- 1 mac staff 64560 Mar 3 2009 A-picture-of-Youpi-key.png
drwxr-xr-x 83 mac staff 2822 Nov 7 14:52 Applescript files/
drwxrwxrwx 12 mac staff 408 Dec 13 2008 Christmas Cards/
drwxr-xr-x 9 mac staff 306 Dec 21 17:39 Christmas Cards 2009/
... trimmed ...
What does all this mean?
drwxrwxrwx
d = directory
r = read
w = write
x = executeable program
drwxrwxrwx
| | |
| | all other users not in first two types
| |
| group
|
owner
# l is long
# a is all to show hidden files & folders
mac $ ls -lFa
total 134736
drwxr-xr-x 41 mac staff 1496 Dec 22 17:11 .
drwxrwxrwt 8 root admin 272 Dec 24 13:55 ..
-rwxrwxrwx 1 mac staff 15364 Dec 23 12:52 .DS_Store*
drwx------ 4 mac staff 136 Jan 22 2009 .Spotlight-V100
drwxrwxrwt 5 mac staff 170 Sep 14 16:36 .TemporaryItems
d-wx-wx-wx 4 mac staff 136 Dec 31 1969 .Trashes
-rw-r--r-- 1 mac staff 64560 Mar 3 2009 A-picture-of-Youpi-key.png
drwxr-xr-x 83 mac staff 2822 Nov 7 14:52 Applescript files
drwxrwxrwx 12 mac staff 408 Dec 13 2008 Christmas Cards
drwxr-xr-x 9 mac staff 306 Dec 21 17:39 Christmas Cards 2009
... trimmed ...
# mv is move or rename
mv -i the-name the-new-name
# You can just rename the file back to what it was with mv command.
mv -i old-name new-name
Here is what these commands mean:
cd is change directory
pwd is a print working directory
ls is list
sudo is Super user do
mv is move or rename
For cryptic comments, you can always uses the manual command which is man. For example:
man mv
# Type the letter q to quit.
I noticed that you had spaces in your filenames or directories. You need to escape them. See examples:
mac $ ls -l ~/"see it"
-rw-r--r-- 1 mac staff 3171 Oct 26 23:38 /Users/mac/see it
mac $
mac $ cd /Users/mac/Desktop/ttt\ html\ copy/
Do you know about tabing? Type in a few letters of a name then press the tab key. The computer will type out the rest of the name if it is unique.
Robert -
I'm not sure if this is the right place or not for this question but I'm really stumped and not sure where else to go!
I renamed a file using a decimal in the actual name (ex: picture 2.99) and was asked something about using the extension '.99'. Being impatient as I am I guess I didn't fully read what it was asking. Now I am unable to rename any files or folders in Finder, nor am I able to create new folders, they all just remain as "untitled folder". Have I completely screwed something up? I really don't even know what I did in the first place! Someone help!!
ThanksI had saved some pictures from the IKEA website and was going to rename them with the price included. I only actually renamed one. I've since deleted the picture, and the folder it was in, which was one I created. It didn't change anything though.
-
Capture file extension problem
Hi
I am using FCP 7 and OS is 10.8.2. when I capture a video footage from my recorder its automaticaly changed the extention of file in avi and file is spliting almost 5gb.But its working in fcp.Anybody knows why did happend this.
Nisar778any chance you've set a limit to the export file size in your system settings?
And don't see how it's creating avi's. First troubleshooting step is to reset your fcp preferences
https://discussions.apple.com/docs/DOC-2491 -
Problem with AI File extension association
I have Adobe CS4 and for some reason, my computer doesn't recognize Adobe Illustrator as the default program for .ai files. Instead, it lists AIRegedit.exe.
When I open up the Properties, it displays in the type of file field "example.ai" as an .ai file instead of the normal Adobe Illustrator Document.
When I open up "Associate a file type or protocol with a specific program" .ai files are listed as "AI File" instead of "Adobe Illustrator Document."
Usually the icon for an Illustrator document is an orange square with inner white lettering, but now it is a white block with a small orange square inside.
I'm novice when it comes to Regedit, so I'm wondering if anyone has had similar problems or suggestions on how I could fix this file extension problem.
Thanks!something got messed up, usually re-starting is the miracle fix for a number of windows issues. If it does not get fix by itself try this:
right click on an AI file, in the context menu choose "Open With", then go down to "Chose Program...". Find AI CS4, select it by clicking once and make sure to check "Always use selected program...." -
FCP exports files without file extensions
Hello-- when I export a QT in FCP, it results in a file that does not have a file extension. I've confirmed that Finder is set to show all file extensions on my system, and when I export a file from FCP and "get info", Finder shows the file name is indeed missing the extension-- and even when I unlock the file and have read/write permissions for it, the "hide extension" option for these exported files is greyed out (so I can't check or uncheck it, and the file details confirm it has no extension as part of the file name).
When these files are accessed on a Windows system, they won't play unless I manually add the .mov at the end... which is really troublesome when I'm doing a massive batch export of files to have to rename each one!
The problem appears to have only started after the last update of 10.6.4... which also coincided with my systems update to FCP 7.0.2. Is this a known issue for anyone else? Or just a coincidence? Thanks for any help in advance!Thanks for the reply Meg! I'm exporting from a sequence... it looks like sending a to Compressor or File>Export>Quicktime movie works OK but selecting a (or several) sequences or clips within the browser and then using the "batch export" feature will generate the file extension problem. Hmmm. I wonder if something is corrupted with my newest install?
-
I'm having problems uploading video taken with my iPhone 4 to Photobucket. FB will not accept the file extension which is ex. IMG_423. They will play on my computer and will upload to Facebook. Why is the phone taking video with this file instead of something like .mov or mp4. How can I change the extension after the fact and avoid it in the future?
You said, "the 4 also has signal and wifi whereas the 5 has only wifi". By "signal", I'm assuing that you mean cellular signal. If so, that means your iPhone 4 is still active on your cellular number and your iPhone 5 is not. Contact your carrier to sort out which phone is active on your account.
-
Problems uploading images with uppercase (.JPG) file extension.
I am using coldfusion 8 and have no problems uploading an image using CFFile when the image has a lowercase file extensions such as .jpg however if the same file has a Uppercase file extension .JPG coldfusion hangs and then just times out. The files are exactly the same just different cases in the extensions.
Any idea?
My cffile is set as such <cffile accept="image/*" action="upload" destination="#uploadfolder2#" filefield="profilePictureFileBrowser" nameconflict="makeunique" >
I tried changing the accept property to image/*, image/jpg, image/JPG but that did not fix the problem eitherThanks for the quick reply. So I removed the tag and even though I get an error after submitting the form it appears to not hang anyways. Any idea how to fix this?
I am on a windows 2003 server so cases sensitifity should not be a problem. I am perplexed as to why this would work with lowercase extensions an not upper? -
I was having an issue opening a spreadsheet with the file extension .xlsm. This appears as an attachment from a client which means macros were utilized when creating the spreadsheet. The problem lies in. The iPads ability to open the attachment. I downloaded the numbers app thinking this would be a default software to open any and all spreadsheets.
Please Help!
Ipad 2- iOS5You may need a version without macros on it. Unfortunately, pretty much all apps are skinned down versions of their original program, often with less functionality. For example in a word document I can italicize,bold and underline, but I only have a handful of fonts to play with and I don't think I can insert tables or images.
It is very possible that the app simply cannot run macros, which means that document may never work on an iPad. -
I cannot keep up with my photos, they somehow change the file extension by adding
a -1 over and over, how can I stop this process
to keep a single file extension?I checked out the backup/sync, it is not turned on after checking. Also I do not have a second computer as a backup, I use an Esata drive of 1 TB.
I have a photo called Rose.jpg, later I try to open the file and it tell be its lost. I try to reconnect, no luck, then I manually try to find the file and its called Rose-1.jpg or up to Rose-1-1-1-1-1-1.jpg or Rose-1-1-1-1-1-1_edited.jpg. I do not understand what is taking place in my computer with my photos. I have about 17,000 photos and I am having a real problem.
Any help would be appreciated. sghmotorhome -
FileDialog (filtering for certain file extensions)
I have used JFileChooser in the past and was modifying my code to use FileDialog instead as it looks better, looks like the one used by every other Windows program and takes less code to get the job done. My
question is how to filter for certain file extensions in FileDialog as you can in JFileChooser. I cannot seem to figure out how to, so any help would be highly appreciated. Thank you.
P.S. Also if you know how to turn off all files like you can in JFileChooser, that would also be extremely helpful.Go to the JFileChooser tutorial at http://java.sun.com/docs/books/tutorial/uiswing/components/filechooser.html and skip to the section entitled "Filtering the List of Files". That sounds like it should answer your question.
-
Damaged files or extension problem
When I copie my files, which I create at home, on the server at my work location (I am using a Maxtor external HD). And I'm opening these files, a lot of the images are being damaged. Mostly -eps and -tif files.
However when I go home and open them again, there's no problem.
The systems and software at home and at the work location are the same. Except for the fact that I don't have a 'server' or network at home. (the server has a windows-platform)
Maybe someone can help me solve the problem?Hi, how do you mean "damaged"? Are the files not all there (a comparison of the size on your hd vs. the file on the server will tell you)? Are the files' extensions being lost? (In the latter case, the file is all there, but the name is altered). Is it something else entirely?
Best,
~FifthWheel -
Problem with reading file extensions from a Fat 32 Drive
I have been copying image files from my imac 24" OSX 10.6.8 to a Maxxtor One touch external USB drive, the drive is FAT 32 format for a PC. My wife then connects the same drive to her laptop which is running Windows 7. She then sorts the images into different folder gives me back the drive to have more loaded to sort. The problem is when I get the drive back all the image files have a funny little box behind the file extension and the preview icon is blank with a exe in green, the file info says it's a Unix extension.
I tried to remove the little box and open the .tif file or .jpg files and all I get is a image is not readable. The same drive can be mounted back to my wife's laptop and the images open up just fine in Windows media viewer.
What's going on here and how do I fix and prevent this from happening again?
Thanks!
PatSo No one has any ideas on how this is happening and how to go about repairing the problem.
The trouble as I see it comes up once she moves the files into another folder on Maxxtor drive when it's hooked up to the Win 7 laptoop. The Data then is unuseable on my Mac from that point on.
I need to know WHY so I can aviod this from happening again, and how to fix currently there is 250 GB of image files I can not access on my Mac and I still have about 2 TB of image files to go through, and THEY ALL NEED TO BE ACCESSABLE.
Anybody? -
Adobe Type Manager problem with Windows 7 and DIN font file extension not showing
I have Windows 7 and for some reason I cannot install Adobe Type Manager onto my Computer.
I need ATM to install the DIN font but am having no luck what so ever.
I can see the DIN font in my Dropbox but it is showing up like this:- ._DIN-bold, no file file extension. what am I doing wrong? is it Mac?Adobe Type Manager absolutely cannot be installed on Windows 7. In fact, even attempting to install it may corrupt your operating system installation and its ability to properly render Type 1 and OpenType CFF fonts. The last version of Windows for which ATM was at all compatible was Windows XP, 32-bit only!
Adobe Type Manager is not at all necessary to install fonts, even Type 1 fonts, on Windows 7 systems. Right click on the font file for TrueType of OpenType CFF fonts or the .PFM file for Type 1 fonts and select the Install option.
The font file you are trying to install is for MacOS. It cannot be installed on Windows.
- Dov
Maybe you are looking for
-
For Dealar's Invoice MRP indicator is not appearing in J1IEX
Dear All, We are trying to capture the the Dealar's Invoice through J1IEX, in po Rate is maintained as per Rs 100 and VAT 4% and then GR is made for the same without captuing any excise in MIGO. and then we are tring to capture and post this excise i
-
I am trying to debug the 64 bit application using any cpu. I've tried using x86 also. but still couldn't start the program.
-
Hi, My media is stored on a synology NAS. I use a Samsung Smart tv and stream media content form the NAS to the tv. The annoying thing is I cannot rewind /forward movies, which seems an unsolvable problem. This is why I consider purchasing an Apple T
-
SOme questions on SCP_REPLACE_STRANGE_CHARS
Hello guys, we're considering to use FM SCP_REPLACE_STRANGE_CHARS in order to transliterate some special characters in texts transferred from SRM Unicode system to ECC Not-Unicode system. Destination and data transfer codepage is 1100. Herebelow some
-
NOKIA 3720 difference between models
Hi my question is what is the difference between NK3720GIMP and NK3720G, both are NOKIA 3720 but they are different price. Why? thank you very much! Rita Solved! Go to Solution.