FileDialog Creation

Can somebody pls show mi how to create the FileDialog for saving a file ??
i have alrady create the Dialog alrady......
it juz that it couldn't save the file that i want.....
I am new to Java Programming... so hope that i can ask for your help...
Thanks

just the basics
<code>
JFileChooser saver = new JFileChooser();
int val = saver.showSaveDialog(this);
if (val == JFileChooser.APPROVE_OPTION)
//assume an already created File variable file
file = saver.getSelectedFile();
else
return;
// save the file to hard drive
try {//assume you have some text area named editor
editor.write( new BufferedWriter( new FileWriter(file) ) );
catch (IOException ioe) {
ioe.printStackTrace();
</code>
That should get you started anyway

Similar Messages

  • FileDialog in Applet throwing security exception.

    I am trying to create a simple applet that a user can select a file from and then upload that file to a server somewhere. I am able to accomplish this using the JApplet class and the JFileChooser class. Everything works fine with the signed applet. However I am going to need to make it compliant with the Microsoft VM since it is for a corporate settings and those people won't have admin rights on their machines to toggle between the VM. So JApplet has been changed to Applet, JFileChooser has been changed to FileDailog and now I am getting this error:
    com.ms.security.SecurityExceptionEx[com/java/applet/il/AimsImporter/AimsImportApplet.actionPerformed]: FileDialog creation denied.
         at com/ms/security/permissions/UIPermission.check
         at com/ms/security/PolicyEngine.deepCheck
         at com/ms/security/PolicyEngine.checkPermission
         at com/ms/security/StandardSecurityManager.chk
         at com/ms/security/StandardSecurityManager.checkFileDialog
         at java/awt/FileDialog.<init>
         at com/java/applet/il/AimsImporter/AimsImportApplet.actionPerformed
         at java/awt/Button.processActionEvent
         at java/awt/Button.processEvent
         at java/awt/Component.dispatchEventImpl
         at java/awt/Component.dispatchEvent
         at java/awt/EventDispatchThread.run
    com.ms.security.SecurityExceptionEx[com/java/applet/il/AimsImporter/AimsImportApplet.actionPerformed]: FileDialog creation denied.
    This line of code is where it blows up:
    FileDialog fileDialog = new FileDialog(new Frame(), "Please choose the file to open:", FileDialog.LOAD);The jar is signed, however something of interest to note: there isn't a pop-up asking me if I would like to trust this applet when I use the Microsoft VM?
    jar.exe -cvf k:\applet\lib\Importer.jar com.java.applet.il.AimsImporter/*.class
    jarsigner k:\applet\lib\Importer.jar mykey
    jarsigner -verify Importer.jar
    Is there something that is different when doing this with the Microsoft VM?????
    Help! :)

    I am trying to create a simple applet that a user can select a file from and then upload that file to a server somewhere. I am able to accomplish this using the JApplet class and the JFileChooser class. Everything works fine with the signed applet. However I am going to need to make it compliant with the Microsoft VM since it is for a corporate settings and those people won't have admin rights on their machines to toggle between the VM. So JApplet has been changed to Applet, JFileChooser has been changed to FileDailog and now I am getting this error:
    com.ms.security.SecurityExceptionEx[com/java/applet/il/AimsImporter/AimsImportApplet.actionPerformed]: FileDialog creation denied.
         at com/ms/security/permissions/UIPermission.check
         at com/ms/security/PolicyEngine.deepCheck
         at com/ms/security/PolicyEngine.checkPermission
         at com/ms/security/StandardSecurityManager.chk
         at com/ms/security/StandardSecurityManager.checkFileDialog
         at java/awt/FileDialog.<init>
         at com/java/applet/il/AimsImporter/AimsImportApplet.actionPerformed
         at java/awt/Button.processActionEvent
         at java/awt/Button.processEvent
         at java/awt/Component.dispatchEventImpl
         at java/awt/Component.dispatchEvent
         at java/awt/EventDispatchThread.run
    com.ms.security.SecurityExceptionEx[com/java/applet/il/AimsImporter/AimsImportApplet.actionPerformed]: FileDialog creation denied.
    This line of code is where it blows up:
    FileDialog fileDialog = new FileDialog(new Frame(), "Please choose the file to open:", FileDialog.LOAD);The jar is signed, however something of interest to note: there isn't a pop-up asking me if I would like to trust this applet when I use the Microsoft VM?
    jar.exe -cvf k:\applet\lib\Importer.jar com.java.applet.il.AimsImporter/*.class
    jarsigner k:\applet\lib\Importer.jar mykey
    jarsigner -verify Importer.jar
    Is there something that is different when doing this with the Microsoft VM?????
    Help! :)

  • Java Applets Security

    Hi,
    I am getting the following error when I try to open a file dialog using my applet (that's part of a cab file). The error message is
    exception: com.ms.security.SecurityExceptionEx(BaseFrame.setAcrobatDir); FileDialog creation Denied.
    Could anyone help?

    Are you creating a dialog box? what is your codes looks like?

  • Forms, FileUpload-Demo

    Hi,
    I have a very special question:
    We use Forms6i with IAS 1.0.2.2 running in Servlet- and HTTPS-Mode.
    If we use the fileupload-function of the 'Forms File Upload Utility' we have downloaded from OTN, each Client gets the following Error-Message:
    connectMode=HTTPS, native.
    Version von Forms-Applet: 60818
    com.ms.security.SecurityExceptionEx[oracle/forms/demos/uploadclient/FileUploader.loadFile]: FileDialog creation denied.
    I use the signed UploadClient.jar(.sig) and i have installed the PJC.x509 certificate on client.
    Can anybody help me?
    Christian

    Christian - you might try just changing your policy file just so you can see that everything else is working. Sometimes a simple permission could be granted. For instance Oracle does this
    permission java.util.PropertyPermission "oracle.server.version", "read";
    in the java.policy file so the Oracle ssl library can get this version. You can do stuff like this just be careful that you don't open your clients up to having sensitive data stolen by unauthorized people.
    read on this page
    http://java.sun.com/products/jdk/1.2/docs/guide/security/PolicyFiles.html#FileSyntax
    here is an excerpt
    Property Expansion in Policy Files
    Property expansion is possible in policy files and in the security properties file.
    Property expansion is similar to expanding variables in a shell. That is, when a string like
    ${some.property}
    appears in a policy file, or in the security properties file, it will be expanded to the value of the system property. For example,
    permission java.io.FilePermission "${user.home}", "read";
    will expand "${user.home}" to use the value of the "user.home" system property. If that property's value is "/home/cathy", then the above is equivalent to
    permission java.io.FilePermission "/home/cathy", "read";
    In order to assist in platform-independent policy files, you can also use the special notation of "${/}", which is a shortcut for "${file.separator}". This allows things like
    permission java.io.FilePermission "${user.home}${/}*", "read";
    If the value of the "user.home" property is /home/cathy, and you are on Solaris, the above gets converted to:
    permission java.io.FilePermission "/home/cathy/*", "read";
    If on the other hand the "user.home" value is C:\users\cathy and you are on a Windows system, the above gets converted to:
    permission java.io.FilePermission "C:\users\cathy\*", "read";

  • Fields in Creation of free goods VBN1

    hi everybody,
    Can somebody expalin in detail the fields in creation of free goods(T-vbn1) like free goods quantity,additional quantity,documnet quantity and calculation rule....
    <b>Please dont copy paste anything form SAP help....I read that one......</b>
    I would appreciate if u explain with your sentence..
    Will reward point if it helps.
    Ghassan

    Hi Gafoor,
    Material
    Material, for which free goods is to be
    granted
    Minimum quantity
    Minimum quantity for which free
    goods can be granted
    From
    Quantity of sales material
    FGQ--- Quantity unit of free goods material
    Free goods -- Quantity of free goods with reference to the quantity and quantity unit of the sales material.
    AQU - Quantity unit of the free goods additional quantity
    Rule - Calculation rule
    Prorata
    whole units
    unit related
    D -- Delivery controlling -  it tells how you can manage the delivery of free goods with respect to the main item ordered.
    Additional material -  Additional material (only available for entry in exclusive free goods)
    Hope it helps. Please reward if helpful.
    Thanks & Regards
    Sadhu Kishore

  • Account determination error - in creation of invoice

    Hello experts,
    i have an error in creation of invoice, after( pgi post goods issue)
    will you please help me out to solve this error.
    thanks & Regards,
    yogesh raina

    hello sir,
    After going throuth this path it shows no gl account in account determination chart
    as below
    Condition type     Message     Description
      ZPR0                                  123     Access KOFI not carried out (initialized field)
    Access     Message     Description
    10     123     Access KOFI not carried out (initialized field)
    20     121     No G/L account found in Account determination type KOFI
    30     123     Access KOFI not carried out (initialized field)
    40     121     No G/L account found in Account determination type KOFI
    50     121     No G/L account found in Account determination type KOFI
    60     123     Access KOFI not carried out (initialized field)

  • Automatic PO creation of free text PR

    Hi!
    We have all our PRs in free text since we are not yet using material master. One of our purchase organization will only order from one vendor and they will enter that vendor and price in the PR. Is it possible to create a PO automatically from that PR without a material or source list?
    Sincerely
    Anders

    Hi
    Thank you very much. Is it possible to restrict the automatic creation to a certain purchase organization?
    If I understand you right:
    1) Create PR with item category D Service
    2) Activate automatic PO creation in ML91
    That will create POs for all PRs created as a service?
    Sincerely
    Anders

  • Issue in creation of plant related data at receiving server using BD10

    Hi all,
    This is regarding Material master creation using B10.I am using MATMAS05 message type for sending data from one system to another.Data is sent and received successfully.When i go in mm03 i can see all the views created successfully accept views related to PLANT.Please guide to resolve the issue.
    When i entered into Log-
    1)"The field MBEW-BKLAS is defined as a required field; it does not contain an entry".
    2)"No material master data exists for material AB_08.04.09(30) in plant 4001".
    My segemnt is as follows-
    ZMATMAS05                      matmas05
           E1MARAM                        Master material general data (MARA)
               Z1KLART                        KLART----
    My extention
               E1MARA1                        Additional Fields for E1MARAM
               E1MAKTM                        Master material short texts (MAKT)
               E1MARCM                        Master material C segment (MARC)
                   Z1AUSPM                        E1AUSPMDistribution of Classification:----
    My extention
                   E1MARC1                        Additional Fields for E1MARCM
                   E1MARDM                        Master material warehouse/batch segment (MARD)
                   E1MFHMM                        Master material production resource/tool (MFHM)
                   E1MPGDM                        Master material product group
                   E1MPOPM                        Master material forecast parameter
                   E1MPRWM                        Master material forecast value
                   E1MVEGM                        Master material total consumption
                   E1MVEUM                        Master material unplanned consumption
                   E1MKALM                        Master material production version
               E1MARMM                        Master material units of measure (MARM)
               E1MBEWM                        Master material material valuation (MBEW)
               E1MLGNM                        Master material material data per warehouse number (MLGN)
               E1MVKEM                        Master material sales data (MVKE)
               E1MLANM                        Master material tax classification (MLAN)
               E1MTXHM                        Master material long text header
               E1CUCFG                        CU: Configuration data
           E1UPSLINK                      Reference from Object to Superior UPS
    Thanks.
    Edited by: sanu debu on Apr 27, 2009 7:10 PM

    CREATE CONTROLFILE SET DATABASE "NEWDB" NORESETLOGS ARCHIVELOGAlso when you are setting a new database, the option should be RESETLOGS and not NORESETLOGS.
    'D:\APP\ADMINISTRATOR\ORADATA\NEWDB\ONLINELOG\O1_MF_2_7FK0XKB8_.LOG
    D:\APP\ADMINISTRATOR\ORADATA\NEWDB\DATAFILE\O1_MF_SYSTEM_7FK0SKN0_.DBFWhy underscore(_) at the end of the datafile name. Any specific reason ?

  • Issue in Creation of new Value Field in CO-PA

    Hi,
    I have a query in CO-PA Value Field Linking.
    In my Development Client,
    1. Created a New Value Field (No Transport Request Generated)
    2. Linked to the above to new Conditon type created in SD. (Tranport request was generated) i.e. in Flow of Actual Values->Transfer of Billing Documents->Assign Value Fields
    However then i try creating a new Value Field in my Production Client it throws a message 'You have no authorization to change Fields".
    Is this an issue with authorization or i need to transport the Value field too from Development to Production client.
    Please Advise.
    Thanks in Advance,
    Safi

    Thanks Phaneendra for the response.
    The creation of Value field did not create any tranportation request. Will this too be transported if i transport the Operating Concern.
    Please Advise.
    Thanks,
    Safi

  • Issue in creation of control cycle

    Dear Gurus,
    During creation of control cycle (LPK1), the fields for source information is not appearing in my system.
    I compared control cycle in a different ECC system where source information is appearing.
    How can make the screen appear in my ECC system.
    Please find the screenshots.
    Any pointers will be highly appreciated.
    This thread is further to the threads in Production Planning and LE/WM Forum. I could not resolve the issue with the threads.
    Hope that I will get any pointer in EWM forum.
    http://scn.sap.com/thread/3609441
    http://scn.sap.com/thread/3610822
    With Regards,
    Malay

    Hello Malay,
    Can first contact your ABAPer and ensure the bottom screen is not an Screen Enhancement?
    If it is a some custom development, your ABAPer can help you on the logic behind it.
    Else, Let us know.
    Regards,
    Sathish

  • Issue in Creation of XML file from ABAP data

    Hi,
    I need to create a XML file, but am not facing some issues in creation of XML file, the in the required format.
    The required format is
    -<Header1 1st field= u201CValueu201D 2nd field= u201CValueu201D>
       - <Header2 1st field= u201CValueu201D 2nd field= u201CValueu201Du2026u2026. Upto 10 fields>
              <Header3 1st field= u201CValueu201D 2nd field= u201CValueu201Du2026u2026. Upto 6 fields/>
              <Header4  1st field= u201CValueu201D 2nd field= u201CValueu201Du2026u2026. Upto 4 fields/.>
               <Header5 1st field= u201CValueu201D 2nd field= u201CValueu201Du2026u2026. Upto 6 fields/>
          </Header2>
       </Header1>
    Iu2019m using the call transformation to convert ABAP data to XML file.
    So please anybody can help how to define XML structure in transaction XSLT_TOOL.
    And one more thing, here I need to put the condition to display the Header 3, Header 4, Header 5 values. If there is no record for a particular line item in header 3, 4 & 5, I donu2019t want to display full line items; this is only for Header 3, 4 & 5.
    Please help me in this to get it resolved.

    Hello,
    you can use CALL TRANSFORMATION id, which will create a exact "print" of the ABAP data into the XML.
    If you need to change the structure of XML, you can alter your ABAP structure to match the requirements.
    Of course you can create your own XSLT but that is not that easy to describe and nobody will do that for you around here. If you would like to start with XSLT, you´d better start the search.
    Regards Otto

  • What are the mandatory fields while creation of material master in differen

    what are the mandatory fields while creation of material master in different views?

    Hi Gopi,
      This is purely depends on the function configuration, which would be done MM consultants.  Kindly check with them.
    thanks & regards
    Kishore Kumar Maram

  • BADI for changing fields during Creation of BP in CRM

    Hello to everyone,
      I need to find a BADI (or other way) to default several fields during BP creation in CRM (4.0 SR1 SP9). The fields I will like to set are TAX TYPE, TAX NUMBER, TAX CATEGORY, etc.. I have found the BADI BUPA_TAX_UPDATE but i dont see any suitable parameters (structures) to changes these fields. Please advice and thanks in advance.

    Hi
    If you use function BUPA_NUMBERS_GET then your BP number will already be buffered and you can avoid a DB read. It may also be that the BP is not in the DB yet anyway.
    You can only pass one GUID in at a time - loop through IT_CHANGED_INSTANCES into a variable of type BU_PARTNER_GUID and pass that into the function as input parameter IV_PARTNER_GUID.
    Cheers
    Dom

  • Error in creation of purchase materials/Goods receipt against PO(FI-MM)

    Hi All,
    While processing FI - MM integration iam facing below errors,request to guide me with same
    1) While creation of purchase materials
    Valuation class 7920 not allowed for material type Raw material Message no. M3180
    Diagnosis
    The combination of values you have entered is not defined in the system.
    Procedure
    Check your entries, and choose a valid value or combination of values with F4.
    I have crossed checked in t code OMSK valuation class 7920 exists.
    2) Goods receipt against PO:
    Number range for trans./event type WE in year 2014 does not exist Message no. M7562
    Diagnosis
    The number range for document number assignment has not been maintained in the year 2014 for the transaction/event type WE.
    Procedure
    Contact your system administrator.
    in second case i have maintained number ranges in OBA7,OMBT,still iam facing with the same issue
    Regards
    Santosh

    Hi Dev,
    Thanks for your reply...yea i have done the ground work before posting this query
    but bitt confused with the post i have come across..
    Problem was occurring due to the wrong updating of raw material instead of finished goods in  MM01 (CREATION OF PURCHASE MM)
    however i have over come my 2nd issue,hopefull will over come my 1st issue also
    Thanks a lot
    Santosh 

  • Reg View creation in Generic

    Hi SDN,
    Im trying to create Generic Data source of View Method. I wanted to create View on BSID ( Closed Customer Invoices) and BSAD ( Open Customer invoices) Tables, But while creating its giving error as "THERE IS NO RELATION BETWEEN THE TABLES"  I want to know how to create Relation Between the tables. Both BSID & BSAD are standard tables, so we cant make any changes.
    Please let me know the procedure to bulid Rlation between the tables.
    Regards
    Sujan

    Hi Siva,
        You have to give relation between these two tables in tab "Table/Join Conditions".
    Creating Views:
    http://help.sap.com/saphelp_webas620/helpdata/en/cf/21ecf9446011d189700000e8322d00/frameset.htm
    View creation fr generic extraction
    Hope it Helps

Maybe you are looking for

  • Can I use a SCSI hard drive in a SCSI CD-ROM enclosure?

    I have an external SCSI hard drive which has stopped working. It has been going OK for some time, but has suddenly ceased completely, i.e. the light doesn't even come on when I plug it in. I'm guessing from this that it may be the power supply that's

  • Photoshop cs2 download

    I tried downloading photoshop cs2 from adobe but it won't install. It keeps saying "The installer encountered an error that caused the installation to fail. Contact the software manufacture for assistant." This is a free download that was provided by

  • Dependencies on "Ku0094 item category on BOM

    Hi I need a configurable material where BOM components have to be chosen from characteristic values, so I thought I could use 200 class on BOM to make it easier, but I need to control component quantity and component measure unit too. I had tried to

  • Multi language support for Product Information Management

    Does Product Information Management support mutiple langauges and to what extent? For example, an Item Description can be entered for several language but can the user-defined attributes be entered for several languages? Where can I find more documen

  • SOLMAN_SETUP transaction

    I've just installed Solution Manager 7.0 EhP 1 on a Windows server with MS SQL Server 2005. The install went fairly smoothly (only a coulple of memory issues), although my practise server does not have a Fully Qualified Domain Namae (FQDM) or a conne