No Property Events are fired with JFileChooser

Hello,
I'm trying to use the JFileChooser class and I have a problem on which I've been already wasting for more than 2 days. I don't know whether it is normal, but if I implement an accessory with :
      JFileChoose fc = new JFileChooser();
         fc.setAccessory(new ImagePreview(fc));The class ImagePreview displays a thumbnail of the selected file (if a picture). In this class, , I have implemented the listener :
         fc.addPropertyChangeListener(this);When running my program, I noticed an strange behaviour if multiple selections are allowed.
If I select only one image name, the picture displays correctly in the preview panel.
If I select many (one by one) the image does not change. I checked with a trace (I've just added a System.out.println) the listener gets control only on the first selected item.
Is it normal ?
In fact, I'd like to select (or not select) a picture depending on what I'm seeing from the Preview panel (but of course, without deselecting items already selected. )
Is there a solution ? Thanks in advance for help
Gege

If you're listening the for "SelectedFileChangedProperty" on the file chooser then it will always tell you the first file in the selection, not the one that was just added/removed.
At a guess, you should be listening for the "SelectedFilesChangedProperty" (plural!) to get a list of all the files that are selected.
Another guess: if you want to know the files that have just been added to the selection you should remember the previous selection and difference it with the new selection (probably just using suitable Collections).
Not sure if this it what you're after (and don't ask me why JFileChooser has such an odd selection model).
Hope this helps.

Similar Messages

  • TS3999 There is no Europe/Minsk timezone in iCloud calendar interface. All scheduled events are displayed with 1 hour error.

    There is no Europe/Minsk timezone in iCloud calendar interface. All scheduled events are displayed with 1 hour error.
    Is there any workaround?

    Hello again, Kirik17.
    The concept still holds true. When clicking to select your time zone, you will need to select another city within your same Time Zone so that that one becomes your default.
    If you are still unable to select your Time Zone, you may find more information by using another one of Apple's Support Resources at: https://getsupport.apple.com/GetproductgroupList.action.
    Cheers,
    Pedro.

  • Control which events are synced with iPad?

    I have iCloud set up on my Mac/iPad, and it is successfully syncing my calendar events.
    However, I don't want minor recurring events that I have on my Mac calendar to be popping up alarms and cluttering up the calendar on my iPad.
    How do I control which events are synced with the iPad?
    Thanks.

    Hi,
    You could either make a calendar under "On My Mac" to take the events you do not want synced to iCloud.
    Alternatively make a calendar under "iCloud" for them and uncheck it on the calendar list on your iPad.
    Best wishes
    John M

  • Custom Events are repeating with the standard events

    Hello All,
    I am facing a problem with the customization of standard OA Page.
    We have modified the page by adding a new custom region with three buttons in it. We have also developed a controller for that region to handle the events. when a button is clicked, a new page opens up in a new window.
    I have observed that the custom controller is called when any event occurs in the page irrespective of the region.
    Now the actual problem is whenever any of the custom buttons are clicked, according to the requirement the new window opens up. But if we perform any other standard events in the page like clicking a standard LOV immediately after performing the custom event, then that most recent custom event is repeating with that standard event.
    how to prevent this repetetion of custom event with standard event?
    please help me solve this problem..
    Thanks in advance.

    For your page, are you setting the controller class for your various regions in the property inspector?

  • Lync Phones Disconnect Events are Firing when a call is answered

    Im working with Lync client SDk 2013. I am trying to write a simple desktop application to determine when a call is Ringing, Answered, and Disconnected. I testing my application using Lync Desk phone (polycom phones). When i call my Lync phone, i get a "Notified"
    event, and when That call is answered, i get a "Disconnected" event.
    private static LyncClient _client;
    private static void Main()
    _client = LyncClient.GetClient();
    _client.ConversationManager.ConversationAdded += ConversationManager_ConversationAdded;
    _client.ConversationManager.ConversationRemoved += ConversationManager_ConversationRemoved;
    Console.ReadLine();
    static void ConversationManager_ConversationAdded(object sender, ConversationManagerEventArgs e)
    e.Conversation.Modalities[ModalityTypes.AudioVideo].ModalityStateChanged += Program_ModalityStateChanged;
    static void Program_ModalityStateChanged(object sender, ModalityStateChangedEventArgs e)
    Console.WriteLine("Modality state changed "+ String.Format("{0} => {1}", e.OldState, e.NewState));
    static void ConversationManager_ConversationRemoved(object sender, ConversationManagerEventArgs e)
    //....some code.
    }output from this code isModality state changed Disconnected => NotifiedModality state changed Notified=> DisconnectedI did come across few nice articles, but those don't seem to help me.http://blog.thoughtstuff.co.uk/2013/01/tracking-lync-conversations-in-code/http://msdn.microsoft.com/en-us/library/office/hh345194(v=office.14).aspxIs there any way to determine when the call is answered and disconnected?Thanks

    Hi,
    You might post the issue on Lync MSDN forum and more developing expert will help to verify if this can be achieved using Lync SDK. Thank you for your understanding.
    http://social.msdn.microsoft.com/Forums/en-US/communicatorsdk/threads
    Best Regards,
    Eason Huang
    Eason Huang
    TechNet Community Support

  • View events are firing multiple times after navigating views.

    I made a basic app that has a Home View and a 2nd View and attached mxml events for activate and deactivate onto each of them. From the home view there is a button that pushes the 2nd view. If I suspend and reopen the app from the Home View, the deactivate and activate events fire once each. Then, if I go to the 2nd view and do the same thing, the activate/deactiate events from the Home View fire alongside the ones from the 2nd view. When I go back to the Home view and repeat the test, 3 sets of activate/deactivate events fire (2 from home, 1 from 2nd) and this keeps going. Why is this happening and how do I prevent it? Am I doing something wrong here?
    I've tested this in Air 3.3-3.5 on an android 2.3 device and on the desktop tester.

    If EBS then post in {forum:id=475}

  • I have a question about the calendar on the ipad2. I have multiple calendars in different colors. Some of the events are filled in with color. Others are just listed with a colored dot in front of the event. Any ideas why events ar showing up differently?

    I have an ipad2 and my question is about the calendar. I set up multiple calendars with different colors. Some of the events show up in filled color. Others only show with a colored dot in front of the event. I can't figure out why some show up one way and others show up differently? Any thoughts?

    On mine the ones that show on a coloured background are all-day events, the ones with dots and just timed events.

  • What organizer app has a really good WEEK VIEW like my Palm Pilot - it's a grid with days across the top.  Below each day- the day is divided into hourly grids.  When events are schdeuled across  week - you get a mosaic of time blocks.  Analogue - great

    What organizer app has a really good WEEK VIEW like my Palm Pilot - it's a grid with days across the top.  Below each day- the day
    is divided into hourly grids.  When events are schdeuled across  week - you get a mosaic of time blocks.  Analogue view is  great way
    to comprehend the time obligations as a molar pattern.
    thx,
    Fritz

    I use Week Cal on the iPod.  I think it was only $1.99.  It is a lot better and does a lot more than the one that came with the Palm Pilot.
    As you know, unlike the Palm Pilot, the iPod does not come with a desktop application that you can sync your iPod calendar to.  Since I don't use Outlook, I have to use a Cloud based calendar to sync with my PC.  I use Hotmail's calendar for that.  (If your computer is a MAC, you can use iCal)

  • I recently removed an outlook account and now all of my calendar events are missing. The majority of them were added from my iphone 4s. How do I retrieve the events? Backing up with iCloud did not help, as I assumed it would.

    I recently removed an outlook account and now all of my calendar events are missing. The majority of them were added from my iphone 4s. How do I retrieve the events? Backing up with iCloud did not help, as I assumed it would.

    Outlook is a mail client for PC's (and Macs). It is not a type of account. Do you mean an "Exchange Account"?
    If so, then re-add it. The calendar events live on the Exchange Server. The only way to get them back is to re-add the account to the phone. The contents of Exchange and IMAP accounts are not part of the 'backup' as they already exist elsewhere.

  • Hello, starting with today I have a strange problem: all events are correctly shown in the finder but in FCP-X there`s`none and every time I open it creates a new event. What is wrong?

    Hello, starting with today I have a strange problem with Final Cut Pro X: all events are correctly shown in the finder but in FCP-X there`s`none and every time I open it creates a new event. What is wrong?

    Here`s the screenshot.
    But anyway:
    The drive is Makintosh HD from my Macbook and it is shown in the event mediathek and in the projects. Since I`ve recognized this problem I installed FCPX again and consequently the event and project directory created by FCPX is where it should be and it shows all the test events including it`s files.
    So what happens? Opening FCPX you see only one event and that a new empty event. All previous events are not shown there even if you can see them in the finder. So if you import again the clips they are in this new event library. After closing correctly FCPX and reopening there again is nothing than an new and empty event. What it does is that it recognized that i.e. there are events with previous numbers and so it creates an new one with the next available counting number.
    If you want to open one event from the finder it by clicking to the file it opens FCPX but it says it cannot open the clicked file.

  • HT1229 How do you transfer photos to external backup and keep the photos in events with event name or with description name. Each time I have tried to transfer them they only transfer with a jpg number so you don't know what photos are what.

    How do you transfer photos to external backup and keep the photos in events with event name or with description name. Each time I have tried to transfer them they only transfer with a jpg number so you don't know what photos are what. When you have several thousand photos it is difficult to determined what is what.
    Why does iPhoto have the ability to put photos in events and to give them descriptions if it doesn't transfer this info with the photo. I want to back my photos up to an external drive.

    The simplest way to achieve what you want is to back up the iPhoto Library. That will get everything.
    You sem to be exporting from iPhoto to the Finder. The Finder does not have the same organisation capabilities as iPhoto. If you're going to do that you need to understand some of the differences between the two.
    Event Name will become  Folder Name.
    'Description Name' I guess is the Title you give the Photo
    Jpeg Number is the File Name assigned by your camera.
    So: File -> Export
    Set your Kind to Jpeg
    Select your preferred Quality
    Check the Boxes at 'Titles and Descriptions' and Location Information
    Under FIlename select 'Use Title'
    Click on Export. In the Next Window choose a New Folder as your export destination and then Name that as you prefer
    Regards
    TD

  • Ever since enabling Soft Delete on one of my tables, the logs are flooded with "... does not support the 'deleted' system property"

    I enabled Soft Delete on one of my Azure Mobile Services tables, and ever since then, the logs are flooded with tons of warnings that say something like this:
    The table 'Section' does not support the 'deleted' system property.
    Is there a way to suppress these warnings, or is it advisable to enable soft delete for all of my tables?
    As a follow on, is there a way to export the logs so that it's easier to peruse through them and search?
    Thanks :)

    Hi
    You can set your logging level in Azure Admin portal to be Error only, so it only logs errors and warnings will be ignored.
    Regards
    Aram

  • When I syn my Iphoe 5 with my outlook calender in Itunes, the events are duplicated every time I resync.

    When I sync my Iphoe 5 & Ipad Air with my outlook calender in Itunes, the events are duplicated every time I re-sync. This should not happen.

    Hi tampabay1,
    Thanks for visiting Apple Support Communities.
    You can use the steps in this article to troubleshoot the duplicated calendar:
    iCloud: Resolving duplicate calendars after setting up your calendar application for iCloud Calendar
    http://support.apple.com/kb/ts4118
    Regards,
    Jeremy

  • TS3999 My iPad is not syncing calendar events via iCloud that I enter on my iPhone 5, but events entered on the iPad are syncing with the iPhone.

    My iPad is not syncing calendar events via iCloud that I enter on my iPhone 5, but events entered on the iPad are syncing with the iPhone.

    On you phone, go to Settings>Mail,Contacts,Calendars>Default Calendar and make sure you have selected a calendar listed under your iCloud account as your default.  If not, make this change, then enter a new event on your phone and see if it syncs properly now.
    If your settings are already correct, or if after changing them it still isn't syncing properly, make sure all the calendar events on your phone are in your iCloud calendar.  If not, enter any missing events either on your iPad, or on icloud.com from your computer.  Then, after your iCloud calendar is up to date, go to Settings>iCloud on your phone and turn Calendars to Off.  When prompted, choose Delete from My iPhone.  After a minute or so, turn Calendars back to On to sync your iCloud calendar back to your phone.  Then try adding a new event on your phone and see if it syncs properly now.

  • Key events are not fired for  SwingTextField

    No event is fired when a key is typed/pressed. Am I missing something here?
    import javafx.stage.Stage;
    import javafx.scene.Scene;
    import javafx.ext.swing.SwingTextField;
    import javafx.scene.input.KeyEvent;
    Stage {
    title: "MyApp"
    scene: Scene {
    width: 200
    height: 200
    content: [
    SwingTextField {
    columns: 20
    text: " "
    editable: true
    onKeyPressed: function( e: KeyEvent ):Void {
    println("on key pressed");
    onKeyTyped: function( e: KeyEvent ):Void {
    println("on key pressed");
    onKeyReleased: function( e: KeyEvent ):Void {
    println("on key released");
    }

    ya it wont work. just try this one,
    use the keyListener function for all key listener.
    * FxTextField.fx
    * Created on Jan 21, 2009, 9:29:49 AM
    package com.sb.javafx.comp;
    import javafx.ext.swing.SwingComponent;
    import javax.swing.JTextField;
    import java.awt.event.KeyListener;
    import java.awt.event.KeyEvent;
    import javax.swing.JComponent;
    * @author Admin
    public class FxTextField extends SwingComponent{
        var textField:JTextField;
        public var text:String on replace{
            textField.setText(text);
        public var keyListener:function(key:KeyEvent);
        init{
            textField.addKeyListener(KeyListener{
                 public override function keyPressed(e:KeyEvent)
                    text = textField.getText();
                    keyListener(e);
                 public override function keyTyped(e:KeyEvent)
                    text = textField.getText();
                    keyListener(e);
                 public override function keyReleased(e:KeyEvent)
                    text = textField.getText();
                    keyListener(e);
        public override function createJComponent():JComponent
            textField = new JTextField();
            return textField;
    }

Maybe you are looking for

  • Vista and Solaris 10, are they compatible?

    I have attempted to follow dual boot guides found everywhere, but none tailor specifically to (or eve mention) Vista. This is a problem, because Vista does not use the same method of boot as previous versions of NT. So far, in my many failed attempts

  • Using Javascript to Crop Pages in CropBox based on TrimBox

    Hi Is there a way to set crop sizes in mm into CropBox based on the sizes on TrimBox, with Acrobat Javascript? (From the Crop Pages menu) Scenario: set TrimBox sizes (top, bottom, left, right) to CropBox (top, bottom, left, right) Thanks

  • Question on how to loop through a variable amount of objects

    I have a csv file which I am parsing with powershell and it works perfectly. I would like to speed it up. Currently, I call a line that is customized for each groups list of subnets. I have about 30 groups. Some groups have one subnet, some have 5 su

  • Meteo application by default with too poor informations

    Hi, Before using iPhne 4S, I had replaced Meteo application installaed by default with another one (WeatherPro) wich delivers far more informations on the weather. But now, with the 4S and Siri and the new notification center, we are supposed to use

  • Imessage won't work/activate after 5.1

    I updated to 5.1 this morning, and now my imessage won't work. I try to turn it on, and I just get an activation error. "An error occurred during activation, try again".I've read in some other posts that my phone number should show by the imessage op