JFileChooser Approve_Button moves/"jumps"

I have created a subclass of the JFileChooser , setting the my own images on the Save/Open & Cancel buttons. I do this through a changeproperty event.
Everything works well until I click the File Name textfield - this causes the Save/Open button to move.
Any ides ?
The code is below:
public class CustomFileChooser extends JFileChooser {
public CustomFileChooser() {
super();
setFileChooserUI(this);
addPropertyChangeListener(new PropertyChangeListener() {
public void propertyChange(PropertyChangeEvent evt) {
JFileChooser chooser = (JFileChooser)evt.getSource();
setFileChooserUI(chooser);
public void setFileChooserUI (Container container) {
Component c []= container.getComponents();
for (int i = 0; i < c.length; i++) {
Component component = c;
if (component instanceof JButton) {
updateButtonLook((JButton)component);
else if (component instanceof JTextField) {
((JTextField)component).setPreferredSize(new Dimension(300,20));
((JTextField)component).setMinimumSize(new Dimension(300,20));
else if (component instanceof Container) {
if (component instanceof JToolBar)
component.setBackground(Color.white);
setFileChooserUI((Container)component);
private void updateButtonLook (JButton button) {
String text = button.getText();
if (text!=null) {
if (text.toLowerCase().equals("open") ||text.toLowerCase().equals("cancel") ||
text.toLowerCase().equals("save")) {
if (text.toLowerCase().equals("open"))
text=text+"_";
else if (text.toLowerCase().equals("save"))
text="Save";
button.setBorder(null);
button.setBackground(Color.white);
button.setText(null);
button.setOpaque(false);
button.setMinimumSize(new Dimension (73,21));
button.setPreferredSize(new Dimension (73,21));
button.setMaximumSize(new Dimension (73,21));
button.setDisabledIcon(jNMS.Graphics.JNMSResource.getJNMSResource().getIcon(text+" DISABLE.gif"));
button.setIcon(jNMS.Graphics.JNMSResource.getJNMSResource().getIcon(text+" OFF.gif"));
button.setPressedIcon(jNMS.Graphics.JNMSResource.getJNMSResource().getIcon(text+" ON.gif"));
button.setRolloverIcon(jNMS.Graphics.JNMSResource.getJNMSResource().getIcon(text+" ROLL OVER.gif"));

What is the error that you are getting? One work around is that you can simply go ahead and try to do a file operation using theFile.. all you need to do is enclose it in a try catch block and catch the exception. Once an exception is thrown, that is where you can write you error reporting code..
hth

Similar Messages

  • My movies jump on my quicktime player how can i fix that?

    my movies jump in quicktime ...whats wrong?

    Try re-seating or replacing the SIM.  What HAVE you done so far to troubleshoot your issue?

  • Movie jumps around when installing titles, transitions

    2014 iMac all software up to date.
    Have several clips in the movie and when I try to put a transition or title in, the movie jumps from clip tier to another tier. Any way to lock the clip or movie in place when installing titles and transitions?
    Dave Hill

    2014 iMac all software up to date.
    Have several clips in the movie and when I try to put a transition or title in, the movie jumps from clip tier to another tier. Any way to lock the clip or movie in place when installing titles and transitions?
    Dave Hill

  • Itunes music and movies jumping and skipping

    Movies and music are almost unplayable - jumping and skipping. I have tried rebooting and not sure what else to try.

    Type "move itunes library" into he search bar at the top of this page or into the Google search bar. You will find instructions.

  • Quicktime movie will move from "space" to "space" as I change?

    I don't recall this happening before . . . but I could be wrong.  I have a MacBook Pro (about a year old) running LION 10.7.2.
    I've always preferred QT Pro to the QTX version apple has now.  I have 4 SPACES (via Mission COntrol) made on my Mac.  Interestingly, when I open a QT movie in "SPACES" 1 - all is well.
    BUT . . . when I cycle thru SPACES 2, 3, and 4 - the QT movie jumps to the "new" SPACE?
    That's the whole reason for having SPACES (I thought) to have a "clean" desktop.  Is something wrong here - or does QT do that on all machines?
    Thanks,
    Larry

    I don't actually know. But since the reference movie export only takes a few seconds and carries with it virtually no disk space penalty, and the QuickTime export gives me more control and gives me an opportunity to do some other stuff, I never really gave it much thought. I have no idea whether what you're experiencing is an Avid issue or a QuickTime issue, but there do sometimes seem to be some interaction issues between the two platforms. Most of the time I am inclined to blame Tewksbury instead of Cupertino, but that's just my personal bias.
    --Dave Althoff, Jr.

  • Flash root Movie Resize Problem

    Greetings ladies and gentlemen,
    I have been going round and round in circles, trying to solve
    this annoying little problem, and have just ended up biting myself
    in the small of the back. I need help from someone who really knows
    their flash.
    My problem is this - I have a parent flash movie of size
    900x800. I have a button inside this parent that then loads an
    external swf (size 300x200) into an empty mc in the parent. My
    problem is that when the external swf loads, it resizes the parent
    movie (or repositions it depending on whether I am using IE or
    Firefox).
    I can't seem to work out why or how it's happening, and it
    happens whether I use the standard Flash embedding or the swfobject
    method for my HTML page that the movie is embedded in.
    The actionscript code in the parent is very basic:
    but1.onRelease = function() {
    _root.createEmptyMovieClip("mp3_player",
    getNextHighestDepth());
    mp3_player._x = 240;
    mp3_player._y = 390;
    mp3_player.loadMovie("mp3player.swf");
    I can't imagine why the root movie jumps down in size when
    the button is pressed and the external swf loaded. Please, could
    anyone shed some light?
    My html file has the following embedding:

    Yep. I have the same problem and I have searched every forum
    on the web and have spent hours messing with AS. If anyone has a
    clue please throw us a bone.
    Thanks,
    Dr-Clegg

  • QT movie suddenly becomes jittery in logic pro! Is this a bug? Please Help

    OK, this is very odd behavior, I must have changed some song setting here.
    My Quick time movie jumps frames and doesn't play smoothly on one song but if i open it in another session it plays fine.
    I first thought it was a CPU or hardrive problem but after removing all the audio and plugins from the problematic session the QT movie still behaves in the same odd way.
    What did I change that its behaving this way?
    Thanks,
    Shil

    Julian Scott wrote:
    I have had repeated problems with Quicktimes in Logic. A common occurance is opening a movie to work with and to start with it works fine. Then after say an hour of working the frames start jumping and soon the movie is only playing 2 or 3 frames per second (rather than 25). Rebooting the computer is the only solution. The problem occurs with all sorts of movie data rates, codecs and sizes.
    It has become such a problem that I've had to resort by running the video from a second computer using midi to synchronise.
    Julian
    I have had repeated problems with Quicktimes in Logic. A common occurance is opening a movie to work with and to start with it works fine. Then after say an hour of working the frames start jumping and soon the movie is only playing 2 or 3 frames per second (rather than 25). Rebooting the computer is the only solution. The problem occurs with all sorts of movie data rates, codecs and sizes.
    i am pretty sure i know what this problem is....it is a RAM issue. what is happening is that as you run out of RAM, the OS 'pages out' memory to the virtual memory on your system drive. if your drive is full or a lot of memory is being used as virtual memory. this is why you are getting good performance at first, it starts falling over as your system drive is being driven hard, and rebooting helps refreshing the process.
    the solution would be to:
    • ensure you have plenty of RAM
    • ensure that you have at least (as bare minimum) over 30% of your system drive free (actually the minimum should be around 50%)
    • you have virtual memory switched on for samples inside logic
    • you only run logic if it is using a lot of memory for stuff.
    • reduce your track count if you don't need it.
    • reduce your undo history in logic. it absolutely chews up RAM.

  • How to move frame-by-frame in QT7 Pro

    I can't figure this out and it seems so simple (it must be because I could find nothing on a search). One of my movies will go frame-by-frame with the left and right arrows, but another movie jumps in .80 increments. How do I set up QT7 so that the keyboard arrows move the movie exactly one frame at a time? Thanks.

    One of my movies will go frame-by-frame with the left and right arrows, but another movie jumps in .80 increments. How do I set up QT7 so that the keyboard arrows move the movie exactly one frame at a time?
    Actually, both movies are probably incrementing at the frame level. However, in one case the time reference is counting frames and in the other it is displaying the actual time increment of the frame. Basically, there are three similar but different time displays:
    1) #:##:##.## indicating H:MM:SS.TT the the fractional . (period) TT unit is in hundredths of a second and the size of the incremental difference depends of the frame rate of the movie. (E.g., a 29.97 fps movie has an increment of about .03(333)/frame. This is the most common formatting you will likely see for most home movies and conversions.
    2) #:##:##:## indicating H:MM:SS:FF where : (colon) FF is the current frame is expressed as a whole number between 00 and the frame rate for the movie. This format is commonly seen when viewing Apple/iTunes Trailers which normally contains a dedicated timing track. However, this can be turned off using the QT Preference which is usually defaulted to allow the display timing track data if included in the file. Unfortunately, there is no way to force this form of display if no track is included in the movie file.
    3) #:##:##;## indicating H:MM:SS;FF where ; (semi-colon) FF s the current frame is expressed as a whole number between 00 and the frame rate for the movie. This formating option is usually dependent on the plication application in use. For instance, if you play a non-trailer/non-timecodded file in QT 7 and in MPEG Streamclip, you will get a time reference display (type 1 above) but get the "semi-colon" frame reference display in the MPEG Streamclip player.
    Hope this helps you to understand the different displays and how to tell them apart.

  • Small Unwanted Image Movement in .swf File

    Hi. I'm not a Flash developer, so please excuse this question
    if it is sophomoric. Someone created a .swf file for my site that
    transitions multiple images in & out. It can be seen here:
    http://www.shadyladylighting.com.
    The problem is the images seem to abruptly move/jump as they
    are in transition. It's almost as if they jump quickly before they
    change. You have to look close to see it, but it's very annoying
    once you see it happening.
    Can anyone tell me what the problem is and how it should be
    fixed? Although I can't fix it I must hire someone to do so, and
    basically I want to know what the problem is before I pay someone
    to fix it.
    Thanks,
    Mike

    Hard to say what that problem is without seeing the source
    (FLA) file - do you have that by chance?
    Chris Georgenes / mudbubble.com / keyframer.com / Adobe
    Community Expert
    GACUTIL wrote:
    > Hi. I'm not a Flash developer, so please excuse this
    question if it is
    > sophomoric. Someone created a .swf file for my site that
    transitions multiple
    > images in & out. It can be seen here:
    http://www.shadyladylighting.com.
    >
    > The problem is the images seem to abruptly move/jump as
    they are in
    > transition. It's almost as if they jump quickly before
    they change. You have
    > to look close to see it, but it's very annoying once you
    see it happening.
    >
    > Can anyone tell me what the problem is and how it should
    be fixed? Although I
    > can't fix it I must hire someone to do so, and basically
    I want to know what
    > the problem is before I pay someone to fix it.
    >
    > Thanks,
    > Mike
    >

  • .MOV to .PSD image shift...HELP!!!!!!

    I have a .MOV and a .PSD file of the same image, the .MOV is of the .PSD image animating into its place on the .PSD. However when the track (.MOV) jumps to the Layered Menu (.PSD). there is an image shift. How do I prep the files so that the uncompressed quicktime movie and the photoshop file will line up seamlessley?
    Any help appreciated!
    Bill

    I don't know enough about how you applied the motion to tell you exactly why this happends, but I have clue:
    If you are animating the motion in FCP in an uncompressed sequence, the frame size will actually be 720x486. When this gets encoded to mpeg, it gets cropped to 720x480, 4 lines top and 2 bottom, to keep the field order the same.
    I start with a 720x486 file in photoshop, and then manually crop it 4 top and 2 bottom to prepare the version of the still file for the DVDSP menu.
    I might also recommend simply extending your motion quicktime to include the still at the end. It should only add a minute of video to your disc. You can even set the menu in DVDSP to a stilll at the end, as opposed to looping.
    Another thing that can effect positioning of photoshop layers in FCP or DVDSP is if there are any pixels on the layer outside the bounds of the canvas. A quick "select all-image:crop" will eliminate this.

  • Back Up Problem: Movies

    Hi,
    I have been backing up my photos/movies on an external hard drive for some time. Today, I did another back up, and when I tested the short movies taken on my digital camera, they will not play; instead the movie jumps to the end without playing anything in Quicktime. I tried dragging the .mov file to the desktop, but the same thing happens. The movies still play in iPhoto--just not anywhere else. Is this a Quicktime issue or is something else happening?
    Many thanks.
    lsb

    When you export a movie from Photo you need to make sure you use the Kind:Original setting in the export dialogue, otherwise you get the thumbnail that iPhoto creates from the first frame of the movie.
    For backing up iPhoto check out a utility such as DejaVu which will preserve all of your iPhoto organisation. Your current scheme only gets the current version of the photos.
    Regards
    TD

  • CTI Doesn't Move with Arrow Keys PE12

    I am running into a glitch in Premiere Elements 12. When I nudge the CTI (playhead) using the arrow keys it moves only 1 frame no matter how many times I press the over arrow. The audio continues to scrub and the time indicator continues to change for each frame, but the CTI itself is stuck and no longer represents the proper location.
    Anyone solved this?
    I am using a MacBook Pro running OS 10.8.5.

    Thanks ATR for you reply, here I will try to explain my findings.
    My hw. sw. setup
    MACBook Pro, OS X 10.9.4, 16Gb, licensed Premiere Elements 12.1 upgraded from 12.0
    Just to confirm....are you saying that if you do just a one tap on the right or left arrow key, the Timeline Indicator will move 1 frame.              YES (if slow repeat).
    But, if you hold down and continue to hold down on the right of the right or left arrow key, the Timeline Indicator will not go into a continuing movement?     YES.
    >> Today I have found that this problem only show up in ”Expert” edit mode and not in ”Quick” mode.
          1. Current Timeline Indicator (CTI) only move/jump one frame when I first start to hold right or left key pressed, after this first jump CTI will stop to move,
                my movie and time counter will move and count as expected.
          2. If I repeat pressing right or left key with a speed faster than one press per 3seconds the CTI will be stopped,  slower repeat than every 3 second then CTI will move on every key press.  
          3. Note1   when CTI not move during continue key press or fast repeat R/L (< 3sec) the accumulated new CLI position will show up as a long jump on next press after 3sec paus.  
          4. Note2   I have also verifies with my Win7 friend with a new installed PE 12.1 running just fine without this CTI problem.  (MAC version only??)
    If so, several things that I would like you to do if you have not already....
    1. Delete the Adobe Premiere Elements Prefs file which should be found
        Users\Libraries\Application Support\Adobe\Premiere Elements\12
    >> After I delete the Adobe Premiere Elements Prefs file I did restart PE12 program and created  a new project ( an new PE Prefs was automatic create in the same directory as expected)
          But unfortunately my problem is still there.  
    2. In the opened project, go to Edit Menu/Preferences/General and experiment with the Timeline Playback Auto-Scrolling Options (No Scroll, Page Scroll, and Smooth Scroll).
    ATR Premiere Elements Troubleshooting: PE12/12.1: Timeline Playback Auto-Scrolling
    >> Thanks, here I found lot of good reading but your suggestion to change the Timeline Playback Auto-Scrolling Options did change scrolling behavior,
           unfortunately my problem is still there. 
    I am strictly an Elements Windows user, so please double check the translation of the suggested locations from Windows to Mac.
    How would describe your issue - "it worked before but not now" or "it never worked before".
    >> My best answer must be;  I have not seen this problem before but I´m trying to learn video editing so I could have missed the CTI behavior.
    Looking forward to your follow up.
    Thank you.
    Add On...Like the originator of this thread, are you working with a tryout of Premiere Elements 12/12.1?
    No this is a licensed version 12.0 upgraded to 12.1
    Summary:
    My conclusion must be that this CTI behavior is a software bug  (maybe only in MAC versionPE12 or in  some combination).
    How to fix my problem:
    Will a reinstall likely fix the problem?
    Or is´t a case for Adobe Support to handle? 
    I´m happy for any help here.
    Regards.
    Per

  • Video preview is playing slowly with "jumps"....

    Hi,
    I just captured some video from my DV camera, and wanted to edit it, but unfortunately I am unable to do so since I can only see the video preview playing very slowly.
    I created a new sequence, and dragged the captured video into it.
    Then on the main premier screen I can see the project frame, a "source" frame, a "program" frame, and a "Timeline" frame.
    Trying to hit the play button on the "program" frame start playing the video, but slowly. I can hear the video sound running normally but the video is playing slowly then it should, and I can see the seconds and mil-seconds running but slowly when the seconds jump up and down like in : 111111122211222222333223333334443344444 and so on and the video have some jump all the time.
    Does anyone know what might be the problem?
    The file that was saved on the disk is playing normally using other media tools.
    I hope I explained myself clearly, but if not please let me know.
    Amir

    Hi,
    Thanks for the quick replay.
    I did read the guidelines, but I guess that because I tried to be very detailed, it became messy.
    I will try again.
    I have attached a screenshot of the screen.
    As you can see in the screenshot, there are two yellow squares.
    Trying to play the video in each one of then will make the video play slowly, and in slowly I mean that every "second" (which is 25 frames...) take a little longer, and in that period of a little more then a second the move "jumps" a little bit back and continue to play... then on the next "second" the same thing happen and so on.
    Playing the video and pressing on the "Shuttle" button with the mouse will cause the video speed to change, but the video will play smooth.
    I hope this is more understandable and if not please tell me which information to add to make it clearer...
    Thanks
    Amir

  • First time problem with a movie download

    I bought a movie yesterday...and the download time is incredibly slow. I had other stuff in my queu that flew right through the download, but this one is just going so slow that it doesn't even give an estimated time of completion. I have tried to restart and resume this but still no go...then to top it off, itunes closed with an error and when I restarted it lost all the data that I had managed to get downloaded (15 mins of movie). Now it is restarting again, and I am waiting for a reply from apple as to why this one is slow when all others are so fast...
    Anyone else experience this? Or have an idea on how to get it moving?

    I was having the very same problem! I downloaded 3 movies at the same time, one of which was Troy (Directors cut). The first two flew by with no problems, now almost 24 hours later Troy is still downloading! I did restart the download around 9pm and this morning when I woke up only 15 minuets of the movie had started.
    Now just as I came in here to ask for help- the movie jumped to 9 minuets left? Very confusing. I had sent apple an e-mail so when they get back to me I can post the reply here for you.

  • K9N Platinum not booting up or showing any picture.

    i had recently bought all my parts for a custom computer. i just received them 2 days ago. i got the k9n platinum motherbaord with an amd athlon 3800+ am2 cpu, ATi x1650 pro graphics card, Ultra 1024MB ddr2 533mhz ram, 320GB IDE hard drive, ide dvd burner, and a Raidmax Sagitta case.
    the problem is i cant boot up into the bios screen. everytime i turn on the pc the monitor doesnt seem to show the computers there, just shows the amber light as if on sleep mode. first off i tried the mobo with just the cpu and graphics card, and still nothin. then the graphics card, cpu, and ram and no results. then just no ram, no cpu and no graphics card to test if the motherboard will give me a beep. i didnt get any beep whatsoever. i also tried this on multiple monitors and still no prevail.
    any help would be appreciated

    Quote from: charlie_fong on 10-November-06, 10:03:54
    uhh how can i find out what the amps are? also im sure the ram isnt the problem since the motherboard doesnt even beep with or w/o memory... but who knows?? so i am somewhat narrowed down to the motherboard or the psu..
    on the PSU sticker. (read +12V xx Ampers)
    move your memory stick to the 1st orange slot DIMM3, close to the CPU socket.
    remove power cord from the PSU, hit power button several time to drain caps electrify, touch with hands some metal for ES discharge, and Clear CMOS.
    move jumper(JBAT1, green jumper near to the battery) to Clear Data position, wait 1 minute, then move jumper to the Keep Data position:
    pull back power cord, ensure all power cables are connected to the mainboard.(24 ATX connector, 4pin JPW1, and 4pin HDD style JPW2) then  turn on PC.
    post back results.

Maybe you are looking for