JFileChooser - after slecting save -- the JFC reappers

Hello,
I having a problem with JFileChooser. After inputing the filename in which to be saved and slecting the save button - JFileChooser re-appears! Does anyone know why? I just want the JFileChooser to dissapear after I select Save.
i'm using j2sdk version 1.4.2_01-b06. Platform Windows XP SP1.
saveMethod() {
File fdata = null;
JFileChooser jc = new JFileChooser();
jc.setFileFilter(txtF);
jc.setSelectedFile(null);
if(result == JFileChooser.APPROVE_OPTION) {
  fdata = jc.getSelectedFile();
  savedata(fdata);
}

Like its written in the previous reply you should have :
saveMethod() {
File fdata = null;
JFileChooser jc = new JFileChooser();
jc.setFileFilter(txtF);
jc.setSelectedFile(null);
int result = jc.showSaveDialog(parentComponent);
//parent Component can be this if your class extends JFrame for example
if(result == JFileChooser.APPROVE_OPTION) {
  fdata = jc.getSelectedFile();
  savedata(fdata);
}

Similar Messages

  • I am trying to update a chart in Pages that I created in Numbers, but the refresh button does not show up after I save the Numbers file. Thoughts?

    I am trying to update a chart in Pages that I created in Numbers, but the refresh button does not show up after I save the Numbers file. Thoughts?

    It is hard to exactly understand what you have  done or not by you one sentence description. My thought is have you read in the Pages User Guide? Here is what it says about updating a chart in Pages:
    Updating a Chart Copied from a Numbers Document
    If you’ve created a chart in Numbers, you can copy it and paste it into your Pages document. After it’s been pasted into Pages, the chart remains linked to the data tables it references in Numbers. To change the chart data, open the original Numbers document and edit the data there, save the Numbers document, and then refresh the chart data in Pages.To update a chart after you’ve updated its linked Numbers table:
       Select the chart on the page and click the Refresh button that appears.
    Note: You must save the Numbers document before copying and pasting your chart into your Pages document and after editing the Numbers data tables that the chart references.
    I hope it has helped you.

  • Font size won´t stay the same size after I save the form

    Hello!
    I need to set up a form with fonts sized 15.5, 9.5 and 7.5px.
    Acrobat allows those sizes but once I save the file the form I´m filling has sizes 16, 10 and 8.
    Is there any way to solve this issue?

    Hi,
    I have had this problem.
    It seems that iChat is more sensitive to small breaks in the network link. Web Browsers and Mail just don't show them as they make new connections each time they download mail or change pages.
    If wireless try it wired for elimination purposes.
    Check the time any DHCP server renews the leases.
    8:49 PM Monday; February 26, 2007

  • LWUIT Resource Editor. what do you do after you save the resource file?

    I have read up on LWUIT and the Resource Editor/Theme Creator. I can set the Label Border to empty as I want. Then I save the file.
    But what do I do next._ I need to get the resource file into my JAR, I believe, and then activate the resource settings in my App. I have read the LWUIT doc over and over and tried a few things but I don't get it . Help.

    Thanks,
    Thanks, I was able to get that code in with a few additions as below
    Resources resource = null;
    try {
    resource = Resources.open("/MMC2_Package/MMC2.res");
    } catch (IOException ex) {
    ex.printStackTrace();
    UIManager.getInstance().setThemeProps(resource.getTheme(resource.getThemeResourceNames()[0]));
    There are no errors but it doesn't work yet. I tried to change the background colour of the command keys, as well, but no change. My resource file is called MMC2.res and I put it in the MMC2_Package directory along with the java file and some png images , one of which I am able to put in the label but it has this border that I am trying to get rid of.
    Mike

  • Help me in creating a collection of Themes. After I save the file and save, it says there is an error in the form.

    I need step by step instruction I think. I saved the icon as a png file. I browsed to the file and saved it. But it always returns the same error msg: "there is an error in the form"

    It might be because the new Firefox's are not compatible with many
    of the themes.

  • Powerpivot data connection will not save the password

    I'm trying to create a Powerpivot workbook with data that users can refresh themselves before analysis.  We don't have Powerpivot data refresh in Sharepoint active, so I can't make use of that service.
    When I create a Powerpivot data connection to SQL server using SQL Server Authentication (unchanging read-only username and password), and checking the box to save the password, the connection works fine for refreshing the data as long as I leave the workbook
    open.
    If I close the file and re-open it, the password is gone from the data connection and the user cannot refresh the data.
    I've tried configuring the data connection with the SQL native client provider and the SQL OLEDB provider and I see exactly the same results.
    The connection string gets built with Persist Security Info=True and the Password shows up as hidden text (dots).  It stays this way through refreshes as long as the workbook is open.  However, once I close the file and re-open it, the
    connection string no longer has the Password parameter listed at all, not even as hidden text.  Persist Security Info is still there and set to True.  As might be expected, the connection string does not have the information needed to access the
    SQL Server instance.
    This type of connection string using SQL Server Authentication still works fine with the password saved when used directly as an Excel data connection, or when used as a data source in Reporting Services.  It's only Powerpivot where the password gets
    blown away.
    Is there a workaround for this issue?

    Thanks Jaynet.
    Unfortunately, the procedure described in the link you provided does not work for PowerPivot, at least in Excel 2010.
    If I create the PowerPivot data connection using "From Database/From SQL Server" there is no option to "Allow saving password".  There is only the checkbox to "Save my password".  There is an "Advanced" button that allows you to set many additional
    properties of the data connection, but there is nothing like allow saving password.
    If I create the PowerPivot data connection using "From Other Sources/Others (OLEDB/ODBC)" and then click the "Build" button, I get a dialog that is pretty close to the one in your link.  For the Provider tab, I can choose either the Microsoft OLE DB
    Provider for SQL Server or the SQL Server Native Client 10.0.  In the connection tab I do have the "Allow saving password" checkbox.  I check this and complete the rest of the data connection configuration.  After I save the file with this data
    connection and then re-open it, the data will not refresh.  If I edit the existing connection from the PowerPivot design tab, the Password parameter is completely missing from the connection string.  If I go back into the connection string builder,
    there is nothing in the password field (not even dots) and allow saving password is no longer checked.
    I've even tried creating my own connection string in Notepad and pasting it into the connection string box (definitely including Persist Security Info=True).  This does not work either and PowerPivot erases the entire Password parameter just the same
    as if I had used the builder and checked Allow saving password.
    I'm beginning to think that the previous poster, David Hager, has it right.  This may be a bug introduced with the latest version of PowerPivot.  If there is no workaround, it is a total pain for me.
    Mike Paulonis

  • Form save problem - lose data after first save

    Hi,
    I have used Reader Extensions to permit Adobe Reader to fill in and save a form but find that after one save the rights are lost. Can you tell me what limits rights? Are there features of a form that may result in the rights being removed after a save? The form in question has some automation, for example it allows a user to click a button to reveal more subforms. It loses the save data rights even if the user just opens the form and then saves it. The next time it is opened the save data usage rights have been removed.

    Check the data binding on the field that loses its value. If it says "none", that's the problem. A quick way to check the bindings is to use the bindings tab on the Report pallette. To see the Report pallette, go to (menu)Window-->Report.
    Jared Langdon
    www.jlangdon.ca

  • How To Open PopUp for every 15 min Till User Saves The Data

    Hi all,
    I am working on an application where I need to open a popup for every 15 min till user saves the data and stop after users save the data. I am not able to get idea on how it could be done. Kindly post some views in which this could be achieved.
    Thanks in advance.

    Hi,
    one alternative is the uncommittedDataWarning property is a out of the box funcionality, but don´t have time configuration.
    https://blogs.oracle.com/shay/entry/warning_of_uncommitted_unsaved_changes
    if no you can use a af:poll in combination with a popup message

  • Is it wise to keep the Nikon camera files "DSC's"  after downloading them and converting to DNG files via Adobe converter for lightroom use. In other words do the DNG files have all the raw data I would ever need in processing or should I save the camera'

    Is it wise to keep the Nikon camera files "DSC's"  after downloading them and converting to DNG files via Adobe converter for lightroom use. In other words do the DNG files have all the raw data I would ever need in processing or should I save the camera's DSC files?

    DNG files do not contain some metadata supplied by the camera, which can be used by the manufacturer's software. Thus, if you don't keep the original Raw photo, you will lose this information.
    If your 1000% sure you're never going to use the manufacturer's software, then this isn't a problem. But who can be sure what software you will be using 10 years from now?

  • After I updated to ios5 my calendar did not bring in dates and when I began re-entering dates after one or two it froze up and after I got it going again it will not populate an end time on the same date and will not save the appointment as a consequence.

    After I updated my Ipad2 to IOS5 my calendar lost all appointments.  After re-entering a couple of appointments it froze.  After getting it going again, the calendar will not populate an end date for the current day and consequently I can't save the appointment.  Is this a common problem as I have just purchased this ipad and the calendar function is very important to me.

    Hmm... It looks like they are gone forever now then. I can't think of any other way of getting them back apart from restoring from an iTunes or iCloud backup. Somebody else might be able to help but I think they're gone forever. I don't know why they were wiped from your iPod but it could be something to do with security. In the future I would recommend syncing to iTunes or iCloud to prevent it from happening again. You can always make a reservation at the Genius Bar and see what those guys can do because it seems that they are still there, they are just 'hidden' from view. http://concierge.apple.com/reservation/gb/en/techsupport/
    Cheers,
    Khal
    P.S I'm sorry for the late reply

  • I finally got my iphone out of recovery mode, after 7.1.1 but now it won't accept my Icloud info and states "An error occrured while trying to save the Icloud account?" What do I do????

    I tried updating my iphone 4 to 7.1.1 and it went straight into recovery mode.... I finally got my iphone out of recovery mode, but now it won't accept my Icloud info and states "An error occrured while trying to save the Icloud account?" What do I do????

    Same situation. I installed iOS 8 beta 4 on my iPhone 5 and a few days later my iCloud account disappeared. My contacts and calendar entries are gone.
    My Mac Mini and MacBook do sync as they should with iCloud.
    When I try to log in to iCloud on the iPhone (the username shows "[email protected]" and password shows "required"), I put in my username and password and tap "Sign In", It says "Verifying" at the top and after a while checkmarks appear next to my username and password. Then I get an error message saying "An error occurred while trying to save the iCloud account". If I tap OK the message goes away, leaving my username and password intact (checkmarks are now gone). If I tap "Sign In" again I get a message saying " '[email protected]' is Already Added. This iCloud account has already been added to your iPhone". If I go back to Settings and then go into iCloud again it's not set up and appears as I stated at the beginning of this paragraph.
    Nothing works and the sync does not occur. Contacts are empty and Calendar has no entries.

  • To Disble the Field in Table Control after clicking Save button

    Hi,
    I have a requirement as follows. i need to disable one field in the table control after clicking save button. i tried with SCREEN elements but it disabling whole the table control but i need to disable that particular one record only in the table control. i found Structure CXTAB_COLUMN in documentaion. it has the properties like invisible. can any body tell how can we disble that particular field in table control only for the one record. and how can we use CXTAB_COLUMN.
    Thanks in advance.

    hi,
    do like this...
    in USER_COMMAND_1000 module of PAI,
    MODULE user_command_1000 INPUT.
      CASE ok_code.
        WHEN 'BACK' OR 'UP' OR 'CANC'.
          LEAVE PROGRAM.
        WHEN 'SAVE'.
          fl = 1.
          GET CURSOR LINE lin.
      ENDCASE.
    ENDMODULE.                 " user_command_1000  INPUT
    and make on module disable in Loop Endloop in PBO.
    and write like this...
    MODULE disable OUTPUT.
      LOOP AT SCREEN.
        IF tab1-current_line = lin AND fl = 1.
          screen-input = 0.
        ELSEIF tab1-current_line < lin.
          screen-input = 0.
        ELSE.
          screen-input = 1.
        ENDIF.
        MODIFY SCREEN.
      ENDLOOP.
    ENDMODULE.                 " disable  OUTPUT
    here fl and lin both are type i.....
    and there will b one module in PBO
    MODULE tab1_change_tc_attr.
    in that put if condition....
    MODULE tab1_change_tc_attr OUTPUT.
      IF sy-ucomm <> '' AND sy-ucomm <> 'SAVE'.
        DESCRIBE TABLE itab LINES tab1-lines.
      ENDIF.
    ENDMODULE.                    "TAB1_CHANGE_TC_ATTR OUTPUT
    ur problem will solve...
    reward if usefull....
    Edited by: Dhwani shah on Jan 2, 2008 1:17 PM

  • In iphoto, how do i save a photo after editing, in the same or higher file size, it's saves in a lower size

    in iphoto, how do i save a photo after editing, in the same or higher file size, it's saves in a lower size

    It's rather more complicated that this.
    iPhoto is a lossless editor. You don't lose any quality on your shot in iPhoto.
    The file size you see reported is the size of your iPhoto Preview: this is what gets used if you access the data via a media browser. It's a "good-enough-for-most-uses" version of the shot. Email it, upload to websites, use it in Presentation, Word processing file etc
    If you want to set the quality yourself then Export the photo using the File -> Export command.
    You can choose to export to Jpeg, Tiff or png. Tiff is lossless but the file sizes are up to 10 times larger. Jpeg allows you to choose different qualities: High, Medium or low. The difference is the amount of compression involved. High quality means very little compression. It's not unusual for photos exported at this setting to have a larger file size than the original.
    Which setting you choose depends on the use you intend. Further editing, printing then high is important. Sending to Facebook? Well low will do just fine there as they're going to trash the file anyway.
    But the key point: the file size only becomes an issue when you export.
    Regards
    TD

  • After I installed the recent Apple security patch, I can no longer save PDFs when using Safari. And Firefox no longer can open website PDFs. Any suggestions?

    After I installed the recent Apple security patch, I can no longer save PDFs when using Safari. And Firefox no longer can open website PDFs. Any suggestions?

    Dansyacht wrote:
    If the previous Safari suggestion doesn't work try the following:
    In Finder, go to Macintosh HD/Library/Internet Plug-ins and move AdobePDFViewerNPAPI.plugin to the Disabled Plug-ins Folder.  Restart Safari.  If this works you may just want to delete that FUBAR plug-in.
    Thanks.  This was the solution for me.
    Message was edited by: tvdowntown

  • How to find the ME29N 'USER EXIT' when our save the release PO after.

    How to find the ME29N 'USER EXIT' when our save the release PO after.
    which user exit will be used?
    thanks.
    alex.

    Hi,
      process :
        go to tranx code :   ME29N ,
           System---->Status , here copy the program name (SAPLMEGUI),
         go to abap editor and specify the program name SAPLMEGUI and find the package "ME".
         tranx code : CMOD ,  Utilites--->Sap Enanchement,
                                         specify the package name : ME
                                          and execute, displays a list of exits ,
                                 and find out our suitable exit based on requirement.
    check these :   EXIT_SAPMM06E_021
    reg
    Siva

Maybe you are looking for

  • New Hard drive and Window disc

    I bought a dv6-6047cl before, and the hard drive is not working now.  (No window disc with the laptop) So i buy a new hard drive,after i put the new hard drive and it shows me  DISK BOOT FAILURE, INSERT SYSTEM DISK AND PRESS ENTER What should i do? S

  • How to change language in print dialog ?

    Hi, I use the following piece of code to start printing:             PrinterJob printJob = PrinterJob.getPrinterJob ();             printJob.setPrintable(printable);             printJob.setPrintService(printService);             if (printJob.printDi

  • Issue with dot1dTpDiscards (1.3.6.1.2.1.17.4.1.0)

    I'm trying to get dot1dTpDiscards via oid 1.3.6.1.2.1.17.4.1.0 With a lot of small switches, no problem (2960, 3560, etc) but with my 6500 I'm getting increasingly values (while via cli I see no problems): # snmpget -c public@10 172.20.255.249 1.3.6.

  • Need a report for track Advertisement status

    Hi , Please help me to provide a sql query to find out last used date of advertisement. The advertisement should be both package + TS.  or  separate  report. Thanks, Tushar

  • App for recording internet radio stations?

    Hi, have looked in the app store for an app that will enable me to record internet radio stations that I am listening to. I have seen there are plenty of recorders that will record voice etc through the iphone mic but I really want to record what I a