File Chooser is displaying names of the Files and Directories as boxes

Hi All,
Actually i am working on an application in which i have the requirement to internationalize the File Chooser in All Operating Systems. The application is working properly for all languages on MAC OS, but not working properly for the language Telugu on both the Ubuntu and Windows OS. The main problem is, when i try to open the File Chooser after setting the language to TELUGU all the labels and buttons in the File Chooser are properly internationalized but names of Files and directories in the File Chooser are displaying as boxes.
So please provide your suggestions to me.
Thanks in Advance
Uday.

I hope this can help you:
package it.test
import java.awt.BorderLayout;
import java.awt.Frame;
import java.awt.event.ActionEvent;
import java.awt.event.ActionListener;
import java.util.Locale;
import javax.swing.JButton;
import javax.swing.JDialog;
import javax.swing.JFileChooser;
import javax.swing.JFrame;
import javax.swing.JPanel;
import javax.swing.SwingUtilities;
import javax.swing.UIManager;
* @author Alessandro
public class Test extends JDialog {
     private JFileChooser fc = null;
     private Frame bfcParent = null;
     public Test(Frame parent, boolean modal) {
          super(parent, modal);
          this.bfcParent = parent;
          if (fc == null) {
               fc = new JFileChooser();
               fc.setAcceptAllFileFilterUsed(false);
               fc.setLocale(Locale.ITALIAN);//i think you should use english
               //these are in telugu
               UIManager.put("FileChooser.openDialogTitleText", "Open Dialog");
               UIManager.put("FileChooser.saveDialogTitleText", "Save Dialog");
               UIManager.put("FileChooser.lookInLabelText", "LookIn");
               UIManager.put("FileChooser.saveInLabelText", "SaveIn");
               UIManager.put("FileChooser.upFolderToolTipText", "UpFolder");
               UIManager.put("FileChooser.homeFolderToolTipText", "HomeFolder");
               UIManager.put("FileChooser.newFolderToolTipText", "New FOlder");
               UIManager.put("FileChooser.listViewButtonToolTipText", "View");
               UIManager.put("FileChooser.detailsViewButtonToolTipText", "Details");
               UIManager.put("FileChooser.fileNameHeaderText", "Name");
               UIManager.put("FileChooser.fileSizeHeaderText", "Size");
               UIManager.put("FileChooser.fileTypeHeaderText", "Type");
               UIManager.put("FileChooser.fileDateHeaderText", "Date");
               UIManager.put("FileChooser.fileAttrHeaderText", "Attr");
               UIManager.put("FileChooser.fileNameLabelText", "Label");
               UIManager.put("FileChooser.filesOfTypeLabelText", "filesOfType");
               UIManager.put("FileChooser.openButtonText", "Open");
               UIManager.put("FileChooser.openButtonToolTipText", "Open");
               UIManager.put("FileChooser.saveButtonText", "Save");
               UIManager.put("FileChooser.saveButtonToolTipText", "Save");
               UIManager.put("FileChooser.directoryOpenButtonText", "Open Directory");
               UIManager.put("FileChooser.directoryOpenButtonToolTipText", "Open Directory");
               UIManager.put("FileChooser.cancelButtonText", "Cancel");
               UIManager.put("FileChooser.cancelButtonToolTipText", "Cancel");
               UIManager.put("FileChooser.newFolderErrorText", "newFolder");
               UIManager.put("FileChooser.acceptAllFileFilterText", "Accept");
               fc.updateUI();
     public int openFileChooser() {
          fc.setDialogTitle("Open File");
          fc.resetChoosableFileFilters();
          int returnVal = 0;
          fc.setDialogType(JFileChooser.OPEN_DIALOG);
          returnVal = fc.showDialog(this.bfcParent, "Apri File");
          //Process the results.
          if (returnVal == JFileChooser.APPROVE_OPTION) {
               System.out.println("Hai scelto di aprire un file");
          } else {
               System.out.println("hai annullato l'apertura");
          return returnVal;
     private static void createAndShowGUI() {
          JFrame frame = new JFrame("FileChooser");
          frame.setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE);
          JPanel jp = new JPanel(new BorderLayout());
          JButton openButton = new JButton("Open File");
          final Test test = new Test(frame, true);
          openButton.addActionListener(new ActionListener() {
               @Override
               public void actionPerformed(ActionEvent e) {
                    test.openFileChooser();
          openButton.setEnabled(true);
          jp.add(openButton, BorderLayout.AFTER_LAST_LINE);
          //Add content to the window.
          frame.add(jp);
          //Display the window.
          frame.pack();
          frame.setVisible(true);
     public static void main(String[] args) {
          //Schedule a job for the event dispatch thread:
          //creating and showing this application's GUI.
          SwingUtilities.invokeLater(new Runnable() {
               public void run() {
                    //Turn off metal's use of bold fonts
                    createAndShowGUI();
}bye ale

Similar Messages

  • Please choose a different name for the file

    How can I stop this message appearning ?

    By choosing a different name for the file?
    You will need to provide a lot more information. 
    What are you trying to do when you see the message?
    What version of Sqldeveloper are you using?
    What operating system are you running on?

  • How to display name of the table and the description and the table type

    Hi,
    Can you people tell me how to display the name of the table and the description and the table type (View, structure, etc...) used in the program.
    I want to display in a list.
    Kind Regards

    use this program
    TABLES : TSTC, tstct.
    TABLES : DD03l, DD02l.
    DATA : Program like sy-repid.
    DATA : BEGIN OF I_FINAL OCCURS 0,
    tabname LIKE dd02l-tabname,
    TABCLASS LIKE dd02l-tabCLASS,
    TEXT LIKE DD02T-DDTEXT,
    END OF I_FINAL.
    DATA : BEGIN of ITAB Occurs 0,
    name like dd02l-tabname,
    END OF ITAB.
    DATA : TCD(100) TYPE C.
    DATA : var1 LIKE dd02l-tabname.
    DATA : DESC LIKE TSTCT-TTEXT.
    selection-screen skip.
    SELECTION-SCREEN : BEGIN OF BLOCK b2 WITH FRAME TITLE text-002.
    PARAMETERS : r1 RADIOBUTTON GROUP r DEFAULT 'X'.
    Parameters : Tcode like sy-tcode.
    selection-screen skip.
    PARAMETERS : r2 RADIOBUTTON GROUP r.
    Parameters : Prog like sy-repid.
    SELECTION-SCREEN END OF BLOCK b2.
    SELECTION-SCREEN BEGIN OF BLOCK B1 WITH FRAME TITLE text-001.
    select-options : Type for dd02l-tabclass .
    SELECTION-SCREEN END OF BLOCK B1 .
    at selection-screen.
    if r1 = 'X' and Tcode is initial.
    message e001(00) with 'Enter Transaction Code' .
    elseif r2 = 'X' and Prog is initial.
    message e001(00) with 'Enter Program Name' .
    endif.
    START-OF-SELECTION.
    if r1 = 'X'.
    Prog = ' '.
    select single * from TSTC where tcode = tcode.
    if sy-subrc = 0.
    program = TSTC-PGMNA.
    select single TTEXT from tstct into desc where tcode = tcode and SPRSL = 'E'.
    else.
    Write :/ 'Invalid Transaction Code'.
    exit.
    endif.
    elseif r2 = 'X'.
    Tcode = ' '.
    program = Prog.
    endif.
    CALL FUNCTION 'GET_TABLES'
    EXPORTING
    PROGNAME = Program
    TABLES
    TABLES_TAB = itab.
    if itab is initial.
    skip.
    skip.
    skip.
    skip.
    skip.
    WRITE :/40 'No Data Found' color 6 INTENSIFIED OFF.
    ELSE.
    PERFORM : categorize.
    endif.
    END-OF-SELECTION.
    LOOP AT I_FINAL.
    WRITE :/4 I_FINAL-tabname COLOR 2 INTENSIFIED OFF NO-GAP HOTSPOT ON, 35 I_FINAL-TABCLASS COLOR 2 INTENSIFIED OFF NO-GAP,
    50 I_FINAL-TEXT COLOR 2 INTENSIFIED OFF NO-GAP.
    ENDLOOP.
    AT LINE-SELECTION.
    TCD = SY-LISEL.
    var1 = TCD+3(30).
    set parameter id 'DTB' FIELD VAR1.
    call transaction 'SE11' and skip first screen.
    TOP-OF-PAGE.
    WRITE :/45 'TABLE DETAILS RELATED TO THE TRANSACTION CODE' COLOR 7 .
    WRITE :/2 'DATE : ' COLOR 1, SY-DATUM COLOR 1 INTENSIFIED OFF NO-GAP.
    WRITE :/2 'TRANSACTION CODE : ' COLOR 1, Tcode COLOR 1 INTENSIFIED OFF NO-GAP.
    WRITE :/2 'TCODE DESCRIPTION : ' COLOR 1, desc COLOR 1 INTENSIFIED OFF NO-GAP.
    WRITE :/2 'PROGRAM NAME : ' COLOR 1, PROGRAM COLOR 1 INTENSIFIED OFF NO-GAP.
    SKIP 1.
    WRITE :/1(140) SY-ULINE.
    WRITE :/4 'TABLE NAME' COLOR 5 INTENSIFIED OFF NO-GAP,35 'TABLE TYPE' COLOR 5 INTENSIFIED OFF NO-GAP,
    55 'DESCRIPTION' COLOR 5 INTENSIFIED OFF NO-GAP.
    WRITE :/1(140) SY-ULINE.
    *& Form categorize
    text
    --> p1 text
    <-- p2 text
    FORM categorize .
    SELECT dd02ltabname dd02ltabCLASS DD02T~DDTEXT
    FROM dd02l INNER JOIN DD02T ON dd02ltabname = dd02Ttabname
    INTO TABLE I_FINAL
    FOR ALL ENTRIES IN itab
    WHERE DD02L~TABNAME = ITAB-NAME AND TABCLASS IN TYPE AND DDLANGUAGE = 'E'.
    if sy-subrc <> 0.
    skip.
    skip.
    skip.
    skip.
    skip.
    WRITE :/40 'No Data Found' color 6 INTENSIFIED OFF.
    endif.

  • File upload fails if name of the file is in Japanese

    Hi all,
    I posted this message before, but could not get any response. So posting again.
    In my JSP app, I am using the latest MultipartRequest class to develop the file upload functinality through a form. Till now I was using MultipartRequest old release which was working fine for files names in English. But the new one supports international languages and therefore I am trying to use that to upload files named in Japanese. But it fails.
    Worse part is I dont get any error. But the file never reaches the desired location. I am trying to print the filenames in different Java methods just to see the progress, and I can see all the filenames/paths printed right. But the file never gets uploaded.
    Any hints?
    m_asu

    Afternoon!
    I had successfully done the same work . Besides Japanese filename, Korean and Chinese filenames are running ok.
    you should check following points:
    1. jsp's content-type:
    <META http-equiv=Content-Type content="text/html;charset=shift_jis">
    2. form's type:
    <form method="POST" name="aaaa" enctype="multipart/form-data" action = "MyServlet">
    if both points are right, perhaps you should download a new release of uploading file from http://www.servlets.com

  • Changing the display name of project file folders for TOC

    I'm interested in changing the display names of the project file folders for my TOC. For example, I want to name the folder "01-intro" so that it is short and lowercase. But I'd like the TOC to say "Introduction to the System." I know I can manually rename the folder in the TOC either through its properties or by right-clicking => Rename, but I auto-create the TOC occasionally and I don't want to have to rename every folder every single time.
    Does anyone know if there is a way to set a persistent property for the folder so that its display name in the TOC is different? I am using RoboHelp 9. I saw an option called "Detail" in the properties of the WebHelp layout in RoboHelp 8 that seems like it may have done that, but I no longer see this property in RoboHelp 9.
    Any assistance would be much appreciated. Thank you.

    I think the lack of response confirms that if you are going to use Auto Create, you have to accept the way it is.
    See www.grainge.org for RoboHelp and Authoring tips
    @petergrainge

  • Please choose a document name so the destination name is different for the different input files.

    I loaded a folder into Bridge, of files which I intend to reduce to 800 px using one of my own custom actions.
    Please note that I have done this successfully numerous times in the past.
    I go to tools/PS/batch/set:margie's actions/action:reduce to 800
    Source: Bridge
    Destination:Folder
    Choose/new folder/I name folder/create/choose
    The folder name shows after users:users name:desktop
    The problem is in File Naming. After I type in Document Name a name totally different from the folder name/OK,
    the attached window appears.
    I have to select document name in order to complete. So can't I give a name to the files? Thanks

    The problem is in File Naming. After I type in Document Name a name totally different from the folder name/OK,
    If you use an action for resizing based on existing filenames it is not needed to change the document name but just leave it as it is so the files will be save resized and in the folder you have chosen/created.
    When you need to have an addition to the filenames just leave the first field with document name and change the second field (default: extension) to whatever you wish and as last field choose 'extension'.
    e.g.
    field 1: Document Name (If you leave this as it is it reflects the current filename)
    field 2: document name (fill in an underscore "_")
    field 3: 3 digit serial number (adds 001 and further after the underscore)
    field 4: extension (either lowercase or uppercase depending on your needs,I prefer lowercase, but don't change the field name. This puts the existing file extension at the end)
    The example field that is showing above the option fields is a bit distracting because it keeps showing 'MyFile' but that is your existing filename.
    Personally I have a save as to destination in my actions recorded to dedicated folders with the resulted size and I simple run those actions without creating a folder in the batch window, just select the dedicated resizing action.
    When done I move the result to a new folder using Finder, it is just another way of working but the above given example should also work for you.

  • When I download something from the Web, the "Downloads" window opens, but the window remains blank. Before it used to at least show the name of the file and I could open the file from the "Downloads" window. Is there a way to get this functionality back?

    I'm running Windows XP which is updated to latest version (which I think might be Service Pack 3, but not positive.) Mozilla Firefox is version 5.0. I tend to use Google as my search engine so most of the stuff I download comes through sites found through Google, which is also updated.
    At some time in the past (maybe a few versions ago) when I would download a file from the Web, the "Downloads" window would open and in the window would be displayed the name of the file I was downloading or had just completed downloading. I think I used to be able to then click on that file name and the file (or the installation file if needed to start the new program) would open. I am currently using Firefox 5.0 (the "About Firefox" screen says this is up to date) and when I download a file or document, the "Downloads" window appears on the screen as it always has in the past, but it remains blank, i.e., nothing appears in the downloads box. I don't remember making any configuration changes, etc., that may have caused the window to remain blank, but I could be mistaken. I know how to find the items I've downloaded (My Documents / Downloads) and can usually guess what the name of the downloaded file might be, but it used to be much easier when something (anything) showed up in the downloads window.
    I'd love for someone to tell me about a simple fix for this. I'm willing to be quite embarrassed that I did something I shouldn't have.'''

    In Firefox Options / Privacy be sure "Remember download history" is checked. To see all of the options on that panel, "Firefox will" must be set to "Use custom settings for history".
    To find your OS information, on your Windows desktop, right-click the My Computer icon, choose Properties, under System on that small window is info about your OS.
    '''If this reply solves your problem, please click "Solved It" next to this reply when <u>signed-in</u> to the forum.'''

  • How can I know the name of the file that the user has currently open ?

    Hello
    I'm developing a module for x3dv.
    http://hiperia3d.blogspot.com/search/label/X3DV%20Module%20For%20Netbeans
    I am going to add a button to open the files when I click it.
    I just need to know how can I know the name of the file that the user has currently open in the editor. What variable holds it in Netbeans?
    Thank you
    Jordi

    If you are using the JFileChooser to open the document, I would create another class with this included:
    //initiate class variables
    private File f;
    //create JFileChooser
    JFileChooser fc = new JFileChooser();
    fc.setMultiSelectionEnabled(false);
    fc.setFileSelectionMode(JFileChooser.FILES_ONLY)
    //set the chooser to initialise File f with the file selected
    int status = fc.showOpenDialog(null);
    if (status == JFileChooser.APPROVE_OPTION)
         f = fc.getSelectedFile();
    public File getFile()
         return f;
    }

  • Existing cross Reference: how to change the name of the file it refers to?

    Hi everybody,
    I am a professional translator.
    One client of mine sent me a complete FrameMaker 9 book file for translation.
    I translated the content via a CAT-Tool and now am in the process of checking if cross references and markers are ok directly into the file.
    I noticed that many cross references are linked to another file of the book. But in the process of translating each file separately, I gave them a slightly different name (I added the language at the end) so as to be able to recognise them eventually.
    Now I have this problem: I cannot find in the cross reference interface where to change the name of the file into the new one the cross reference is supposed to refer to.
    Am I right in wanting to change the file reference? If so, how do I do that?
    Or is it better to avoid this task and rename the translated file into their original names ? Would it work then?
    Thanks for your help.

    ... book file ...
    ...  each file separately, I gave  them a slightly different name (I added the language at the end) ...
    I'm guessing that you renamed the component files by means other than using the Edit > Rename File from the Book menu.
    If so, do over. Rename from the Book menu. It automatically revises all the cross-references in all the component files.
    In a Book, the only thing that's safe to rename with the file manager is the .book file itself.

  • I've installed LR on my new Mac - How do I find/what is the name of the file that opens to bring up my existing photos (on my external hd)?

    I've installed LR on my new Mac - How do I find/what is the name of the file that opens to bring up my existing photos (on my external hd)?

    Bookmarks and history are stored together in your profile folder in a database file named places.sqlite. These articles should help with restoring as much or as little of your other profile as you like:
    Locating the folder: [https://support.mozilla.com/en-US/kb/Profiles Profiles | How to | Firefox Help]
    The following article has suggestions for recovering bookmarks: [http://support.mozilla.com/en-US/kb/Lost%20Bookmarks Lost Bookmarks | Troubleshooting | Firefox Help].
    To move more settings, see: [https://support.mozilla.com/en-US/kb/Recovering+important+data+from+an+old+profile Recovering important data from an old profile].
    Hope this helps.

  • Function Module that gives the names of the file in the Application Server.

    Hi Experts,
       Please give me a Function Module that gives the names of the file in the Application Server.
    Thanks,
    Debi.

    Hi,
    see these links
    http://help.sap.com/saphelp_nw04/helpdata/en/2a/fa02b7493111d182b70000e829fbfe/content.htm
    http://abaplovers.blogspot.com/2008/05/function-module-sap-logged-in-users-to.html
    http://www.saptechies.com/abap-function-modules/
    http://sap.ittoolbox.com/groups/technical-functional/sap-dev/function-module-to-get-data-and-time-of-file-576751
    thanks
    karthik

  • Need of a Webservice to get the name of the file in a Folder

    Hi All,
    I am in need of a Web service which should get the name of the file in a folder.
    Note :  Folder is created in the MOSS server.
    Thanks.

    Just to add, Mac in intergrated into AD and all I need is help in creating the script
    Thanks

  • Installed office for mac (trial version). now I got 2 excel files, which cannot be deleted. I googled the names of the sheets and found chinese websites I never visited. Are those dialers? How can I get rid of them? system is mac lion(with win 7 parallel)

    now I got 2 excel files, which cannot be deleted on my desktop. I can't open them, either. I googled the names of the sheets and found chinese websites I never visited. Are those dialers? How can I get rid of them? system is mac lion (with win 7 parallel)

    The people who make that stuff have their own forums you can also search/ask in:
    http://answers.microsoft.com/en-us/mac/forum

  • Change File Name In The "File Download" Dialog Box For Web Reports

    Hi All ,
    I followed the below note to change the "File Download" name.
    How To Change The File Name In The "File Download" Dialog Box For Web Reports? Doc ID: Note:418366.1
    However its not working. Has anyone tried this and works fine ?
    Basically I wanted to change the name "rwservlet" when a report is run in an
    excel format.
    Rajesh Alex
    Rajesh Alex

    Hello,
    Have you checked if a HTTP header "Content-disposition" is returned ?
    You can use ieHTTPHEaders for IE
    http://www.blunck.se/iehttpheaders/iehttpheaders.html
    and
    Live HTTP Headers for FireFox
    https://addons.mozilla.org/en-US/firefox/addon/3829
    Regards

  • File importer detected an inconsistency in the file stucture of (file name). Reading and writing this file's metadata (XMP) has been disabled.

    I have duplicated a project to work on another computer. The project opens fine but when I import new footage/audio files I get this message. "File importer detected an inconsistency in the file stucture of (file name). Reading and writing this file's metadata (XMP) has been disabled." Then I can't play my timeline and Premier Pro crashes.  I have to force quit and restart my computer to continue working. What does this error really mean? How do you rectify?
    Our workflow requires that we duplicate projects to make updates because we are frequently revising but need to keep original project unchanged and intact.

    I have a similar issue and message , but occurs when I import AVI clips from OnLocation CS4 to Premier Pro CS4.

Maybe you are looking for