JFileChooser centers the directories in the dialog box

Hello,
I have been searching the forums for days looking for inspiration on my problem and haven't found anything.. (If I've missed it, sorry :( )
My problem is as follows:
I am using JFileChooser to create a pop-up dialog box to open and save files. Unfortunately in the box the directories and files are centered making it look quite bad!!
I know the list button is not enabled, but is there a way I can write my own implementation for it? Err.. any help on how to would be great!!
By the way, if I run the app on my local env (Using Forte for Java 4 it looks fine), its when I put the jars on the server that the problem appears..
Thank you in advance for any help/ideas etc...
Dany

I just finished dealing with the same problem, which I had caused by incorporating a multiline JLabelUI implementation into my app (http://manning.com/sbe/files/uts2/Chapter27html/Chapter27.htm). It isn't likely that your problem has the same cause, but you might as well check--someone may have snuck it in on you ;).
Anyway, here's what I learned. The file/directory view in JFileChooser is just a JList, which uses JLabels to render its cells. JLabelUI, in turn, relies in the method SwingUtilities.layoutCompoundLabel. There are two versions of that method, and one of them is not "orientation-aware"--if the label's horizontal alignment is set to the default, LEADING, it will be converted to CENTER.
Of course JLabelUI should be calling the correct method, but if you're using a custom LookAndFeel, that may have gotten changed. In my case, the LabelUI wasn't calling either of the SwingUtilities methods, but a custom, non-orientation-aware replacement. Also, you may have a version conflict. I don't know when they added this component-orientation stuff, but maybe the JVM on your server doesn't have it.
Hope this helps.
Alan

Similar Messages

  • How do i resize the Dialog box which executes while baGetFolder command.

    Dear friends
    I am very new to director and working for the project which is already developed by some other vendor. in this project i have to implement the below mentioned requirment so can anyone pls help me upon this will be greatfull.
    How to resize the dialog box which appears while the command baGetfolder triggers. Actualluy the problem i am facing is the title of the dialog box extends its width so the title appears incompleted with "....", how can i solve this problem?. It is very urgent requirment and eagely waiting for yours reply.
    thanks in advance

    Hi sean wilson,
    Thank you veru much for your great help. The title of the dialog box is now adjusted into two lines after changed the" flag" value to 1. Your suggestion is very helpful and excellent. I hope you will be here to help those people who are struggling with technical problems. Once again i wish to thankyou much.
    Thanks and Regards
    E.VenkateshKumar
    Chennai
    India.

  • I have a dialog window on my iPad2 labeled iCloud Bakup -- the iPad hasn't been backed up in 4 weeks. The screen is frozen. I can't clear away the dialog box to close down iPad and I can't get to settings to make any changes there. Ideas?

    A dialog box has appeared on the screen of my iPad2 and has frozen the device so that I can't close it down or make changes to the settings. The titel is "iCloud Backup" and it reads: This iPad hasn't been backed up in 4 weeks. Backups happen when this iPad is plugged in, locked, and connected to WiFi.
    I'm not sure why it hasn't backed up but I can't do anything to clear the dialog box, turn off the device or get to any settings or apps on the device.
    Any suggestions? Please help -- I'm caring for my mother in hospice and don't have time to deal with this at the Apple Store!

    Welcome to Apple Support Communities
    Hold Sleep and Home buttons for 10 seconds until the device restarts, so you will be able to use the iPad again.
    It will try to make a backup every time your iPad is plugged to the charger and connected to a network. To prevent that this message appears soon, open Settings > iCloud > Storage & Backup, and choose Backup Now

  • I have a 3rd generation ipod nano. I upgraded to lion. I tried to buy an audio book and download it to my nano like I have done at least 50 times before. Now the dialog box states that I need an ipod touch for the same function. MacBook Pro 2008 w/ m.trac

    I have a 3rd generation ipod nano. I recently upgraded to Lion which is causing lots of issues. Aside from that, I went to the Itunes store to purchase books like I have done at least 100 times before with no problems. Now I can by the book and get it to my computer, however when I tried to download the book to my 3rd generation ipod the dialog box informed me that to download any new audiobook purchases I would need an ipod touch. My ipod nano 3rd generation serves my purposes just fine. Why should I be forced to buy something I do not want just to continue something I have always done seamlessly? I know this is more of a rant than a question but I am sure someone else out there has had this happen to them. Maybe you could share your thoughts on how to work around this issue if possible?

    I forgot to add the last obvious and crucial step I had taken - plugging a different iPod into my system. It was also not recognized. That was the final proof I needed to determine if the problem was device or system. But now what?
    I truly appreciate any help I can get!
    Thanks again...

  • I cannot download my cds to my itunes account., the dialog box does not appear

    I am trying to download my cds into my itunes account. When I put the cd into the frive, I do not get the dialog box popping up to ask me if I want to import it. I looked in my preferenes and switched it back and forth from automatic to manual, and still no cd importing

    Hi kathyshasha,
    Thanks for using Apple Support Communities.  This article has steps in it that may help with issues importing audio CDs into iTunes:
    iTunes 11 for Windows: Import songs from CDs
    http://support.apple.com/kb/PH12486
    Cheers,
    - Ari

  • The dialog box open twice when open file from the server

    I use the following code to download/open file from the server:
    <%
    String filename = "MengxianhuiDocTest.doc";
    String filepath = "D:\\";
    response.setContentType("APPLICATION/OCTET-STREAM");
    response.setHeader("Content-Disposition",
    ??attachment; filename=\"" + filename + "\"");
    java.io.FileInputStream fileInputStream =
    new java.io.FileInputStream(filepath + filename);
    int i;
    while ((i=fileInputStream.read()) != -1) {
    out.write(i);
    fileInputStream.close();
    out.close();
    %>
    If the application runs, the Open or Save dialog box display.When I select open the file,
    the dialog box will display twice.
    Pls help me.
    Thanks.

    thx
    but I tried it and it did't work.
    The dialog box also display twice.

  • Problem with finishing install of Flash Player on a Mac. When finishing by entering the requested password, the dialog box jiggles as if the p/w is invalid. But it works in the Adobe site.

    I am trying to install Flash player on my Mac. All the steps are working as they should, until the point where I am asked to enter my password. I do this, and the dialog box jiggles as through  the p/w were invalid. However, it works to sign in to the Adobe site. I just changed it to be sure and checked again.

    There is no password required to download or install the Flash Player.  Chances are your Mac is requiring you to enter its password to allow the installation to occur.

  • I have multiple itunes libraries. why can't i switch between them (i can see them in the dialog box but they are not select-able)?

    i have a numbe of libraries; i have never had any problems switching between them.  now, when i press alt button and click through to 'choose library...', i am seeing all of my libraries in the dialog box but they are 'greyed' out and i cannot select them.
    any help would be appreciated.
    thanks,
    ohad.

    You can see which dictionary is selected if you right-click in a text area and open the Languages submenu.
    * http://kb.mozillazine.org/Spell_checking
    * http://kb.mozillazine.org/Dictionaries
    * https://support.mozilla.org/kb/Using+the+spell+checker

  • When I right click on a link to open in new tab and move my cursor into the dialog box the box dissapears this is new in the last 24 hours.

    I'm using Firefox 8.0 on Suse 11.4 today is 11/28/11 the past 24 hours I've been experiencing this: I always try to right click on links and open in new tab, lately when I do so and move the cursor into the dialog box the box disappears. Also if I online shop say for clothing, if I want to change size's when I click the button to do so nothing happens when I want to scroll down and pick a different size, (I can hi-light the size and click on it then when the window scrolls back up the default size is still there. This isn't consistent with all web sites.

    You can middle-click a link to open the link in a new tab.
    Start Firefox in <u>[[Safe Mode]]</u> to check if one of the extensions or if hardware acceleration is causing the problem (switch to the DEFAULT theme: Firefox (Tools) > Add-ons > Appearance/Themes).
    *Don't make any changes on the Safe mode start window.
    *https://support.mozilla.com/kb/Safe+Mode

  • I no longer get a dialog box when bookmarking a page. I am unable to title and save the bookmark in the folder of my choice. Where has the dialog box gone please.

    Whenever I have bookmarked a page, I got a dialog box where I could give the bookmark a title and choose the folder to save it in. Now when I click 'Bookmark this page, no box appears. The page is still saved in bookmarks but then I have to go into Organize bookmarks to put it where I want it. This is time I have not had to spend doing so in the past. I would like to know what has happened to the dialog box, why has it stopped appearing as normal? I really would like it back.

    It was Mcafee SiteAdvisor 3.3 of all things that caused the problem. Can anyone suggest a better/equivalent type of extension I could use?
    Thanks,

  • When creating an event the dialog box appears I set the description & time and press save and close and nothing happens. I have reloaded lightening to no avail

    When I try to create an event I click on the date and put the information in the dialog box and click Save& Close but nothing happens. THe dialog box just stays there. I have made sure I am on the latest version of Thunderbird and Lightening. I have deleted lightening and reinstalled from the website and still the same thing.
    I checked the error log in Thunderbird and this is what it said
    Timestamp: 10/15/14 3:55:48 PM
    Error: 2014-10-15 15:55:48 gloda.datastore ERROR got error in _asyncTrackerListener.handleError(): 19: constraint failed
    Source File: resource:///modules/gloda/log4moz.js
    Line: 693

    I am having this problem.  At first with the new iPhone 5, and then with the iPad 2.  I am not sure why this is happening. 
    My gut feeling is this is an iO6 issue and here's why -
    The problem mainly occurs with apps.  I have about 150 apps, and when I plugged in the phone, iTunes went to sync all of them.  The process would hang up after about 20 - 30 apps were loaded onto the phone. I could tell where about the process hung up because the apps on the phone showed up as "waiting".
    Then on the iPad 2 I plugged in to sync and saw there was a huge "Other" component in my storage.  It required me to restore the iPad 2 from backup.  With this restore the same issues occurred - putting the apps back on the iPad would hang up.  The videos on the iPad also got stuck - maybe after about 10 hours of videos transfered iTunes crashed.
    My solution has been to soft reset the device, restart Windows, and continue the process until it's complete.  This is remarkably inefficient and time-intensive but everything works with patience.
    I have been wondering if others have had these same problems. 

  • Is there a way of renaming files AS you download them (as in IE where you type the name into the dialog box as you save)?

    I save batches of records from an info source and need to give them memorable names as I download them, so that I can find the correct record again easily. Currently the system just calls them, e.g. wrlb, wrlb[2], wrlb[3]. When I used IE, I could type a filename into the dialog box as I saved, but Firefox doesn't seem to have any option to rename. Can anyone point me to a solution?

    See Tools > Options > General|Main : Downloads : "Always ask me where to save every file"
    Your plugins list shows outdated plugin(s) with known security and stability risks.
    *Java Plug-in 1.5.0_17 for Netscape Navigator (DLL Helper)
    Update the [[Java]] plugin to the latest version.
    *http://java.sun.com/javase/downloads/index.jsp (Java Platform: Download JRE)

  • I no longer get the dialog box when trying to delete rejected photos.

    I have always used the Delete Rejected Photos. . . selection to get rid of the photos I have flagged as rejected. However, after the rejected photos are shown, the dialog box no longer appears with the option to Delete from Disc or to Remove from the LR Catalog. I don't know if this problem began with LR 3.4 or before, but the timing was close. It isn't that I don't know how to use the function because I have been using it for years. Any help would be appreciated.

    Since I had 358 photos out of almost 2800 flagged as 'rejected' I did not
    want to loose all my work. I selected the rejected photos and then flagged
    them all with a 'yellow' color. I then displayed all photos with a yellow
    flag and 'Un-rejected' them. I highlighted a small amount of them, about 30,
    and rejected them and then went to the Delete Rejected photos. the pop-up
    came up and I was able to delete them. Since the rest of my yellow flagged
    photos were still showing I rejected another chunk of them and so on till
    they were all deleted. When trying to delete a group that had published
    photos within I got a box warning me that if I deleted them the published
    ones could no longer be managed by LR. That is alright with me. It would be
    nice if the software would somehow flag those that had been published. All
    the dialog box said was that one or more of the group had been published. I
    did not know which.
    Thanks again for expert help!
    Jack

  • How to avoid the dialog box "SAVE, Open, Cancel" When we take a pdf print.

    I have an item entry form. User select different items and then submit the order by pressing submit button.
    I want that when the user click the submit button he is directet to the print preview page. I have done that and it is running fine but the issue is when user click on the submit button the dialog box appear showing file name and an option to save or open the file. I want to avoid that dialog box and I want that the file is opened directly.
    In shot I want that the user goes directly to the open file option instead of giving him the options.
    Thx,

    Hello Syed,
    I thought this is a browser behavior. In Firefox it asks the first time what I want to do.
    If I select open and select the checkbox to do that always like that, it's opening directly.
    I searched a bit in javascript, use an iframe or specify different targets, the behavior is the same, unless I check the checkbox I get the dialog box. Maybe there's a workaround, but I didn't find that yet.
    Regards,
    Dimitri
    -- http://dgielis.blogspot.com/
    -- http://www.apex-evangelists.com/
    -- http://www.apexblogs.info/

  • Safari crashes when using the dialog box to import/save files, in facebook under windows 7

    I've encountered the following errors in some PCs, running Safari 5.1.7 in MS-Windows 7 Pro:
    Safari crashes when using the dialog box to import/save files. One doesn't have to actually upload or download any file, the mere invocation of the relevant dialog box brings down all open Safari windows after a couple of seconds.
    Errors displayed in the Event Log are:
    Όνομα ελαττωματικής εφαρμογής Safari.exe, έκδοση 5.34.57.2, χρονική σήμανση 0x4f982b5e
    Όνομα ελαττωματικής λειτουργικής μονάδας CoreGraphics.dll, έκδοση 1.87.0.0, χρονική σήμανση 0x4f9739a0
    Κωδικός εξαίρεσης: 0x40000015
    Μετατόπιση σφάλματος: 0x0013a762
    Αναγνωριστικό ελαττωματικής διεργασίας: 0x17f4
    Χρόνος έναρξης ελαττωματικής εφαρμογής: 0x01cded6b09576023
    Διαδρομή ελαττωματικής εφαρμογής: C:\Program Files\Safari\Safari.exe
    Διαδρομή ελλατωματικής λειτουργικής μονάδας:C:\Program Files\Safari\Apple Application Support\CoreGraphics.dll
    Αναγνωριστικό αναφοράς:ebe64ac9-595e-11e2-a977-0016356671d1
    System
    Provider
    [ Name]
    Application Error
    EventID
    1000
    [ Qualifiers]
    0
    Level
    2
    Task
    100
    Keywords
    0x80000000000000
    TimeCreated
    [ SystemTime]
    2013-01-08T06:45:00.000000000Z
    EventRecordID
    95609
    Channel
    Application
    Computer
    computername
    Security
    EventData
    Safari.exe
    5.34.57.2
    4f982b5e
    CoreGraphics.dll
    1.87.0.0
    4f9739a0
    40000015
    0013a762
    17f4
    01cded6b09576023
    C:\Program Files\Safari\Safari.exe
    C:\Program Files\Safari\Apple Application Support\CoreGraphics.dll
    ebe64ac9-595e-11e2-a977-0016356671d1
    and
    Ελαττωματικός κάδος (bucket) 2970527469, τύπος 1
    Όνομα συμβάντος: APPCRASH
    Απόκριση: Δεν υπάρχει
    Αναγνωριστικό Cab: 0
    Υπογραφή προβλήματος:
    P1: Safari.exe
    P2: 5.34.57.2
    P3: 4f982b5e
    P4: CoreGraphics.dll
    P5: 1.87.0.0
    P6: 4f9739a0
    P7: 40000015
    P8: 0013a762
    P9:
    P10:
    Συνημμένα αρχεία:
    C:\Users\username\AppData\Local\Temp\WER51A.tmp.WERInternalMetadata.xml
    Αυτά τα αρχεία μπορεί να είναι διαθέσιμα εδώ:
    C:\Users\username\AppData\Local\Microsoft\Windows\WER\ReportArchive\AppCrash_Saf ari.exe_e273f639ef3d86d52c9d8e15dd2b42dce3e78061_1f86213d
    Σύμβολο ανάλυσης:
    Επανέλεγχος για λύση: 0
    Αναγνωριστικό αναφοράς: ebe64ac9-595e-11e2-a977-0016356671d1
    Κατάσταση αναφοράς: 0
    +
    System
    Provider
    [ Name]
    Windows Error Reporting
    EventID
    1001
    [ Qualifiers]
    0
    Level
    4
    Task
    0
    Keywords
    0x80000000000000
    TimeCreated
    [ SystemTime]
    2013-01-08T06:45:10.000000000Z
    EventRecordID
    95610
    Channel
    Application
    Computer
    computername
    Security
    EventData
    2970527469
    1
    APPCRASH
    Δεν υπάρχει
    0
    Safari.exe
    5.34.57.2
    4f982b5e
    CoreGraphics.dll
    1.87.0.0
    4f9739a0
    40000015
    0013a762
    C:\Users\username\AppData\Local\Temp\WER51A.tmp.WERInternalMetadata.xml
    C:\Users\username\AppData\Local\Microsoft\Windows\WER\ReportArchive\AppCrash_Saf ari.exe_e273f639ef3d86d52c9d8e15dd2b42dce3e78061_1f86213d
    0
    ebe64ac9-595e-11e2-a977-0016356671d1
    0
    I have tried in-installing safari but it seems not to help. I have tried installing it to a third, newly installed pc and come to the same result.
    All PCs are fully up-to-date as it regards Microsoft and Apple patches. Any ideas as to why this might happen?

    Still having the same problem. Ever the optimist, I submit the following info.
    Error window screenshot can be found here: https://dl.dropboxusercontent.com/u/22465174/safari/safari_fail_01.JPG
    Enent log entry can be found here: https://dl.dropboxusercontent.com/u/22465174/safari/safari_fail_02.txt
    Version info can be found here: https://dl.dropboxusercontent.com/u/22465174/safari/safari_fail_03.JPG

Maybe you are looking for