FileDialog File Types show *.txt, please help.

Hi, I have created a very basic text editor. I created a FileDialog in order to save and open files. However, what's the method or class that I can use in order to make the File Types shows the specific extension I am looking for. e.g. *.txt instead of *.* ?

Wow, two birds one stone:
FileDialog fileDialog = new FileDialog( this.frame, "Save", FileDialog.SAVE );
fileDialog.setFile( "FileNameGoesHere" );
fileDialog.show();

Similar Messages

  • Filedialog File type shows *.*, how can I change?

    I wanna change the file type showing in FileType in FileDialog, please help.

    This code is for JFileChoser. You should be able to adapt it for your requirement.
    JFileChooser chooser = new JFileChooser();
    chooser.addChoosableFileFilter(new FileExtensionFilter("Text files", new String[] {".txt"}));
    chooser.addChoosableFileFilter(new FileExtensionFilter("SQL files", new String[] {".sql"}));
    package net.sourceforge.squirrel_sql.fw.util;
    * Copyright (C) 2001 Colin Bell
    * [email protected]
    * This program is free software; you can redistribute it and/or
    * modify it under the terms of the GNU General Public License
    * as published by the Free Software Foundation; either version 2
    * of the License, or any later version.
    * This program is distributed in the hope that it will be useful,
    * but WITHOUT ANY WARRANTY; without even the implied warranty of
    * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
    * GNU General Public License for more details.
    * You should have received a copy of the GNU General Public License
    * along with this program; if not, write to the Free Software
    * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA  02111-1307, USA.
    import java.io.File;
    public class FileExtensionFilter extends javax.swing.filechooser.FileFilter
                    implements java.io.FileFilter {
        private String _description;
        private String[] _exts;
        public FileExtensionFilter(String description, String[] exts) {
            super();
            _exts = exts;
            StringBuffer buf = new StringBuffer(description);
            buf.append(" (");
            for (int i = 0; i < _exts.length; ++i) {
                buf.append("*").append(_exts);
    if (i != (_exts.length - 1)) {
    buf.append(", ");
    buf.append(")");
    _description = buf.toString();
    public boolean accept(File file) {
    if (file.isDirectory()) {
    return true;
    String name = file.getName().toLowerCase();
    for (int i = 0; i < _exts.length; ++i) {
    if (name.endsWith(_exts[i])) {
    return true;
    return false;
    public String getDescription() {
    return _description;

  • I really need someone to help me. I have been trying to figure out how to select a PDF document to convert to a Word doc. When I go to select a PDF file, all that shows up is the WORD docs. does not show ANY of my PDF files... Please help me figure out wh

    I really need someone to help me. I have been trying to figure out how to select a PDF document to convert to a Word doc. When I go to select a PDF file, all that shows up is the WORD docs. does not show ANY of my PDF files... Please help me figure out what is going on? We have it set on auto renewal so I know its not that we haven't renewed this subscription, because we pay automatically.

    Hi olivias,
    It sounds like there may be some confusion on your system about what application should be associated with PDF files. You can reset filename associations by following the steps in these articles (depending on your operating system):
    How to change the default application for a file type | Macworld
    http://windows.microsoft.com/en-us/windows/change-default-programs#1TC=windows-7
    Please let us know if you have additional questions.
    Best,
    Sara

  • I use FPT to try to view a directory on a remote server that contains 19000 files,  only 10000 are showing.  Please help.

    I use FPT to try to view a directory on a remote server that contains 19000 files,  but only 10000 are showing.  Please help.

    Hi Steve,
    You can be right that DISM don’t support the scenario that User profile and System are in the separated volumes.
    As a workaround, we should use the defaults to put the profile on C: during capture image, and then set the profile path to be on the D: drive after the image deploying.
    Please refer to below KB for how to using Sysprep to redirect profiles’ locations.
    Customize the default local user profile when preparing an image of Windows
    http://support.microsoft.com/kb/973289/en-hk
    Hope these could be helpful.
    Kate Li
    TechNet Community Support

  • HT1751 Hi I am unable to open my iTunes at all. A box stating "Runtime Error appears with Program C:/Program Files (x86) iTunes/iTunes R6034 shows up, please help

    I am unable to open my iTunes. A box appears "Run time Error" Program C:/Program Files (x86) iTunes/iTunes
    Please help me

    See Troubleshooting issues with iTunes for Windows updates.
    tt2

  • Created PDF form in Acrobat XI Pro, but HELP fields disappear when I save FCDT file to PDF. Please help. Thanks!

    Created PDF form in Acrobat XI Pro, but HELP fields disappear when I save FCDT file to PDF. Please help. Thanks!

    I am not aware of a field type "Help" within a PDF form. I do not see it as a form field that can be added in the form edit mode.
    Forms Central forms do not support all the features of Acrobat forms.
    Are you talking about the "Tool Tips" or a hidden field that only shows when one enters a field and is hidden upon exiting the field.

  • I was listening to a you tube clip.  i guess i didn't click off the actual clip, because now when i turn on my computer the clip audio plays. i can't locate the file to delete it. please help.

    i was listening to a you tube clip.  i guess i didn't click off the actual clip, because now when i turn on my computer the clip audio plays. i can't locate the file to delete it. please help.

      Quit Safari.
      Hold the shift key down and relaunch Safari.
    Empty Caches
    Safari > Preference > Advanced
    Checkmark the box for "Show Develop menu in menu bar".
    Develop menu will appear in the Safari menu bar.
    Click Develop and select "Empty Caches" from the dropdown.
    Best.

  • HT1918 I do not see None option in the payment type section. Please help to remove my credit card information from apple account.

    I signed into my apple account by iTunes and try to remove credit card information. However, I do not see None option in the payment type section. Please help.

    iTunes Store Support
    http://www.apple.com/emea/support/itunes/contact.html

  • HT1553 Hi, I'm stuck at step 9. I don't see my external harddrive when I want to save the DMG backup file. Can you please help me with this? I'm desperate to make this backup! Big thanx in advance!

    Hi, I'm stuck at step 9. I don't see my external harddrive when I want to save the DMG backup file. Can you please help me with this? I'm desperate to make this backup! Big thanx in advance!
    http://support.apple.com/kb/HT1553

    Repair permissions and restart your computer.  If this does not work, zap the pram.  You should now see your external hard drive. 

  • Hello i am rajesh i am having problem while conveting other files into pdf format please help me

    i am rajesh i am having problem while converting other files into acrobat format please help me

    Hello Rajesh,
    I'm sorry to hear you're having trouble. Are you using Acrobat.com to convert your files to PDF? Please let me know where you are having trouble and I will do my best to help you convert your files. For your reference, here is a list of filetypes that can be converted to PDF online with Acrobat.com:
    http://kb2.adobe.com/cps/524/cpsid_52456.html#Create%20PDF
    Best,
    Rebecca

  • I am trying to stream music from my iMac using iTunes music files to my Cocktail Audio X10 music streamer. I have allowed my files to be shared the X10 sees the files but when I try to accsess them it gives me the message files not mounted. Please help?

    I am trying to stream music from my iMac using iTunes music files to my Cocktail Audio X10 music streamer. I have allowed my files to be shared the X10 sees the files but when I try to accsess them it gives me the message files not mounted. Please help?

    No, I have the music I want to move from the laptop to the phone selected. Then I go under file, devices, and try to click sync but it is not available to click.

  • I have windows 64 and trying to download itunes 10.5, it start downloading but then after it`s almos finish i have a window pup up with error Microsoft ft VC80.CRT,type="win32" etc.Please help.I have windows 7 64

    I have windows 64 and trying to download itunes 10.5, it start downloading but then after it`s almos finish i have a window pup up with error Microsoft ft VC80.CRT,type="win32" etc.Please help.I have windows 7 64

    same here.

  • I receive the below error when imprting an .eex file .... please help

    I receive the below error when imprting an .eex file .... please help
    C:\Documents and Settings\skarnam\Desktop\WFS Fixed Assets BA.eex:Access is denied trying to modify the Business Area with identifier 'WFS_Fixed_Assets'
    C:\Documents and Settings\skarnam\Desktop\WFS Fixed Assets BA.eex:Access is denied trying to modify the Business Area with identifier 'WFS_Fixed_Assets'
    C:\Documents and Settings\skarnam\Desktop\WFS Fixed Assets BA.eex:Access is denied trying to modify the Business Area with identifier 'WFS_Fixed_Assets'
    C:\Documents and Settings\skarnam\Desktop\WFS Fixed Assets BA.eex:Access is denied trying to modify the Business Area with identifier 'WFS_Fixed_Assets'
    C:\Documents and Settings\skarnam\Desktop\WFS Fixed Assets BA.eex:Access is denied trying to modify the Business Area with identifier 'WFS_Fixed_Assets'
    C:\Documents and Settings\skarnam\Desktop\WFS Fixed Assets BA.eex:Access is denied trying to modify the Folder with identifier 'XXWFS_FA_ASSETS_V'
    C:\Documents and Settings\skarnam\Desktop\WFS Fixed Assets BA.eex:Access is denied trying to modify the Item with identifier 'ASSET_NUMBER'
    C:\Documents and Settings\skarnam\Desktop\WFS Fixed Assets BA.eex:Access is denied trying to modify the Item with identifier 'DATE_PLACED_IN_SERVICE'
    C:\Documents and Settings\skarnam\Desktop\WFS Fixed Assets BA.eex:Access is denied trying to modify the Item with identifier 'DEPRECIATION_AMT'
    C:\Documents and Settings\skarnam\Desktop\WFS Fixed Assets BA.eex:Access is denied trying to modify the Item with identifier 'DEPRECIATION_METHOD'
    C:\Documents and Settings\skarnam\Desktop\WFS Fixed Assets BA.eex:Access is denied trying to modify the Item with identifier 'DESCRIPTION'
    C:\Documents and Settings\skarnam\Desktop\WFS Fixed Assets BA.eex:Access is denied trying to modify the Item with identifier 'LIFE_IN_MONTHS'
    C:\Documents and Settings\skarnam\Desktop\WFS Fixed Assets BA.eex:Access is denied trying to modify the Item with identifier 'ORIGINAL_COST'
    C:\Documents and Settings\skarnam\Desktop\WFS Fixed Assets BA.eex:Access is denied trying to modify the Item with identifier 'PERIOD_NAME'
    C:\Documents and Settings\skarnam\Desktop\WFS Fixed Assets BA.eex:Access is denied trying to modify the Item with identifier 'YTD_DEPERIATION_AMT'
    Import completed, but with warnings. Please check the result.
    File(s) imported partially :
    C:\Documents and Settings\skarnam\Desktop\WFS Fixed Assets BA.eex

    Hi,
    You don't say what components you are trying to import into the EUL. But it could be that you are importing a business area which has security access granted to a user that is not defined on the target system. It could also be that the user you are using to do the import does not have admin access to all the components you are importing.
    Rod West

  • Email shows garbage please help

    hi all,
    Please urgent help me in this matter,
    problem is that iam using utl_smtp iam sending emails without attachment it's works fine but when i send email attach pdf file its send successfully but when i open my inbox to check the email with pdf attachment. it's open but attachment not shown in this email. it shows attachment in body as a garbage.
    like this
    This is a multi-part message in MIME format.
    Content-Type: application/pdf
    Content-Disposition: inline; filename="LEDGER.PDF"
    Content-Transfer-Encoding: base64
    JVBERi0xLjQKMSAwIG9iago8PAovQ3JlYXRvciAoT3JhY2xlMTBnUjIgQVMgUmVw
    b3J0cyBTZXJ2aWNlcykKL0NyZWF0aW9uRGF0ZSAoRDoyMDEwMDUwMzE0NDQxNSkK
    L01vZERhdGUgKEQ6MjAxMDA1MDMxNDQ0MTUpCi9Qcm9kdWNlciAoT3JhY2xlIFBE
    RiBkcml2ZXIpCi9UaXRsZSAoKQovQXV0aG9yIChPcmFjbGUgUmVwb3J0cykKPj4K
    ZW5kb2JqCjUgMCBvYmoKPDwvTGVuZ3RoIDYgMCBSCi9GaWx0ZXIgWy9BU0NJSTg1
    RGVjb2RlIC9GbGF0ZURlY29kZV0KPj4Kc3RyZWFtCkdhczFfRC9cRScmSDdeLklp
    LkciJzwxOC5objZDWz11RERSbENwcWcia25FPVdsYlExbkInPiRuWVBAKUdAbk87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idDTzYyYmQhVWhrQmQ9T2AwN25ndShnKykkKWBibC9kb1IyJ2JhZWNpXmAt
    ImU3SUssRD1NOSFlNkhyMlwoJE1NN3QrJ2JsT14rCjYsNkokVEE2KzInYW1BSUZC
    WkY3a1dGaVBfbDc/aGleUkJqcDhdWTpWYk1uRjRrO14rMyMhTWU5KHQ/JThHbzdk
    aUE9Tm4rbSNbOgo9YWZkIWs2PGs2IitvMjohSy9VZDEzLlM0bmhmNlQsSC5Zbmkt
    KlhySUJDNlwhOz9tLG5yMWZONWt0S20xWzNzIiptQ08/SUNZaSgKKyEqJyhGQl1H
    please help me in this matter
    Thanks in advance
    M.Sohail Tai

    Do you think you will get better replies if you post again?

  • Wrong Operand Type Error Message - please help

    I have built a form and I keep getting the message - Wrong Operand Type every time I either try to preview or save to PDF as the file suddenly becomes 90% blank (I can see the content boxes for any date fields in the form and if I click the highlight fields option I can see place holders for all of the content) but other than that it wont process properly. I have tried going through the document and made sure that item by item the fields are all inline with each other, have the same fonts, etc. I even tried deleting out every single item in the form, previewing it, then placing that item back in and moving on to the next to try a process of elimination to see if I could figure out what item(s) were causing the problem, but still no luck.
    Please help.
    CG

    I, too, am having this error message. I read somewhere that it is either because of the font Helvetica Nueue, or because the files is being shared between a PC and a Mac. The quickest fix I have found, is to take the pdf and open it in Illustrator and convert all the text to curves. Then it should work correctly.
    I don't think anyone has found a definitive answer.
    thanks

Maybe you are looking for

  • How to highlight a specific element of an array

    I'm having some trouble selecting which element in an array has key focus. I want to be able to selectively highlight individual elements in an array of strings and set the key focus so that the user can immediately enter the text into that specific

  • Combining single transaction between session bean & application client

    Hi All, The following transaction exception was encountered when trying to combine a EmployeeSessionBean.create(Employee) method in an application client: Application Client output SEVERE: null javax.transaction.SystemException: org.omg.CORBA.UNKNOWN

  • E71 does not strip leading 0 from numbers in conta...

    Hi Having synced contacts from Outlook, I find that the E71 doesn't know what to do with leading zeros in the numbers when the country code is present. If my contact has either of these formats: +44 (0) 1234 567890 +44 (01234) 567809 then the number

  • ICal and Outlook

    It's great to be able to add appointments (events) to my iCal by emailing myself from Outlook, however, if I want to delete the event I can't! Is there anyway to edit an invite (either to change time/date or delete) that was sent to you? Thanks in ad

  • Can HDV be converted to H.264?

    i imported some HDV 1080i footage from my FX1 and exported it as a H.264 file. When i played back the file in quicktime 7, my computer was unable to play it smoothly....and I am curious if that is because the original HDV file has a weird frame rate