JFileChooser and date format questions

I have a JFileChooser that currently works - I set the default directory and allow the user to select a file or enter a file name.
I have been asked to modify this to prepopulate the file name field on the JFileChooser.
How do I do that? It is not obvious which method to call to set the filename field.
Also, the file name needs to be a timestamp "*yyyyMMddHHmmss*.dat"
I tried creating the timestamp part with the following code, but it does not format as expected.
        String s = "";
        SimpleDateFormat dateFormat = new SimpleDateFormat("yyyyMMddddHHmmss");
        try
            java.util.Date now = new java.util.Date();
            java.util.Date dat = dateFormat.parse( now.toString() );
            s = dat.toString();
        }What is wrong with this?
Thanks.

I don't do Swing and this is also not the subforum for Swing questions. It has its own subforum.

Similar Messages

  • BestPractices Error - Set Decimal Notation and Date Format

    Hello everyone,
    first of all, I don't know, if this is the right forum for my question, but I hope so
    We're trying to implement the Best Practices Scenarios to a new SAP ERP System.
    We did the steps of the following url, where everything worked fine: http://help.sap.com/bp_dm603/DM_DE/html/index_DE.htm
    Then we integrated Best Practices 603V8 via Solution Builder (TA: /n/SMB/BBI). But now, when we switch to Implementation Assistant and try to activate Scenario DE_109 --> 100(DE) --> Folder USERSETTINGS, we receive the following error in report /SMB99/SU3_O009_B32: Set Decimal Notation and Date Format.
    So we called transaction SU3 and changed Decimal Notation and Date Format, but the error still exists.
    Anybody knows what to do?
    Thanks for your help!
    Best regards
    Patrick
    PS: We executed Testscript /SMB99/SU3_C009_B32 via TA SECATT and there is the error:
    TCD SU3 0,292 sec N Maintain Users Own Data

    Hi,
    Follow below link to verify whatever you have done is correct:
    http://help.sap.com/bp_bblibrary/600/Documentation/B32_BB_ConfigGuide_EN_MX.doc.
    Thanks
    Sunny

  • List of Number format and Date format according to the Locales

    Hallo everyone.
    I am searching for a list or document which includes the number and date formats according to the country locales. Where can I find sort of document?
    Another question: Where can I find the all parameters of swing.properties file?

    "Date - allows the user to enter a date as a parameter. Note that the data type must also be "Date" and the format must be Java date format."
    Page 4-9, Adding Parameters and Lists of Values
    Oracle® Business Intelligence Publisher
    Report Designer's Guide
    Release 10.1.3.4
    Part No. E12187-01

  • In the advanced tab of languages and Region the time and date formats will not change

    For a certian Application I am using I need to change the format of the Time and Date. I had no problems in Mountain Lion. In the advanced tab of languages and Region the time and date formats will not change. I need the date format to read as 01/01/14 and time format to read 13:00. As I said this was easily done in Mountain Lion and all previous Apple OS. I suspect it's an issue with in the OS.

    You're right, it has been that way for a long time. I've never bothered reporting it as a bug since it's simple enough to deal with, but reporting it would be a reasonable thing to do.

  • Default view and date format for anonymous access in convergence calendar

    Hi,
    is there an option to configure default view and date format when user access to a calendar with anonymous access ?
    Actually, date format is M/D and I want D/M.
    And the default view is monthly, and I would like to set to 7 days view.
    Thx for your help
    Regars,
    JC

    jchatriot wrote:
    is there an option to configure default view and date format when user access to a calendar with anonymous access ?No. I've raise a new Request For Enhancement:
    RFE #6961895 - "Provide configuration option and URL parameter to set Anonymous Calendar view and date format"
    Regards,
    Shane.

  • List all of the existing column and there column format and data format?

    Hello Gurus,
    I am new to OBIEE and i have a requirement to verify the column format and data format for all of the existing column while generating a analysis report. Is there any way i can list down all of the columns which are exposed and list there column format and data format?
    For checking the individual column properties i know there is an option called 'Column Properties' but want to know all in once go.
    Kindly help me and thanks in advance.
    Thanks

    I don't think you have anything in answers to get that, Go to Repository and Utilities -> Generate Metadata Dictionary that will give columns and datatype.
    Award points if it helps
    ~Srix

  • Converting from PDF directly to Java Objects/XML (and PDF format questions)

    Hi,
    I posted this originally in the Acrobat Windows forums but was told I might have more luck here, so here goes:
    I am desperately trying to find a tool (preferably open source but commercial is fine also) that will sit on top of a PDF and allow me to query it's text for content and formatting (I don't care about images). I have found some tools that get me part of the way there, but nothing that seems to provide an end-to-end solution but is quite lightweight. My main question is WHY are there so many tools that go from PDF to RTF, and many tools that go from RTF to XML, but NONE that I can find that go PDF to XML.
    To clarify, by formatting I simply mean whether a line/block of text is bold/italic, and its font size. I am not concerned with exact position on the page. The background is that I will be searching PDFs and assigning importance to whether text is a heading/bodytext etc. We already have a search tool in place so implementing a pure PDF search engine is not an option. I need a lightweight tool that simply allows me to either make calls directly to the PDF OR converts to XML which I can parse.
    Some tools I have tried:
    1) PDFBox (Java Library) - Allows the extraction of text content easily, but doesn't seem to have good support for formatting.
    2) JPedal (Java Library) - Allows extraction of text content easily, and supports formatting IF XML structured data is in the PDF (not the case for my data).
    3)  Nitro PDF (Tool) + RTF to XML (script) - This works quite nicely and shows that PDF to XML is possible, but why do I have to use 2 tools? Also, these are not libraries I can integrate into my app.
    4) iText (Java Library) - Seems great at creating PDFs but poor at extracting content.
    I don't really expect someone to give me a perfect solution (although that would be nice!).
    Instead, what I'd like to know is WHY tools support PDF to RTF/Word/whatever retaining formatting, and other tools support RTF to XML with the formatting information retained. What is it about PDF and RTF/Word that makes it feasible to convert that way, but not to XML. Also, as I found in 3) above, it is perfectly feasible to end up as XML from PDF, so why do no tools support this reliably!
    Many thanks for any advice from PDF gurus.

    XML doesn't mean anything - it's just a generic concept for structuring
    information.  You need a specific GRAMMAR of XML to mean anything.  So what
    grammar would you use?  Something standard?  Make up your own?
    However, there are a number of commercial and open source products that can
    convert PDF to various XML grammars - SVG, ABW, and various custom grammars.
    But the other thing you need to understand is that most PDF files do not
    have any structure associated with them (as you saw when using JPEDAL).  As
    such, any concepts of paragraphs/sections/tables/etc. Are WILD GUESSES by
    the software in question.

  • Email Submit and Data format

    I have been reviewing the following document and have 1 question.
    http://www.adobe.com/devnet/livecycle/articles/lc_understanding_submit_tip.pdf
    Is there a way to customize the data format using a submit button?
    I may have the requirement to have end users submit data through an email submit button, but the client wants the data in the format Fieldname [delimiter of some sort] Fieldvalue, is this possible?  Would you need to manually edit the xml in the form to do this? Any pointers would be appreciated.
    The only options I see in the attributes of the email submit button are:
    XDP
    XML
    PDF
    URL encoded data
    Thank you,

    Hi Paul:
    Currently we are using Acroforms and would use these forms originally.
    In the future, this would be used with LiveCycle so it would probably be an XFA/LiveCycle Designer form. I believe in this case, the best solution would be to do this through a submit using Form Server components of LCES.
    Thank you,
    Working for a Living...

  • RowQualifier and Date format

    I'm trying to filter a ViewObjectImpl rowset based on a RowQualifier where clause using code like :
    ViewObjectImpl voi = (ViewObjectImpl) viewObject;
    RowQualifier qual = new RowQualifier(voi);
    qual.setWhereClause(ATTRIBUTENAME+"="+value.toString());
    Row[] filteredRows = voi.getFilteredRows(qual);
    which works fine for numbers, and for strings if I put some single quotes around the value. It doesn't work when dates are involved tho, always returning no rows.
    The database has stored dates in the form DD-MM-YYYY HH:MM:SS AM|PM, but the query string contains a date in the form YYYY-MM-DD.
    What do I need to do to make Oracle recognise the two formats as being the same?
    Do I need to tell BC4J what date format to use?
    Is there a class I can use to format an oracle.jbo.domain.Date object into a format that the RowQualifier can understand?
    Do I need to use the java DateFormatter to explicitly set the format of the Date before I add it to the where clause?

    >>Jan 1 2014 12:00:00:000AM
    I am not sure(I am also not so good in Zend,but still would like to give it a shot), should the format be like this?
    Jan 1 2014 12:00:00.000 AM
    Also SQL stores the date in the format YYYY-MM-DD hh:mm:ss.fff(2014-02-12 21:41:00.293). So I think, if you pass the date in that format your query would work fine
    Satheesh
    My Blog |
    How to ask questions in technical forum

  • Using a submit email button and data format

    I have been reviewing the following document and have 1 question.
    http://www.adobe.com/devnet/livecycle/articles/lc_understanding_submit_tip.pdf
    Is there a way to customize the data format using a submit button?
    I may have the requirement to have end users submit data through an email submit button, but the client wants the data in the format Fieldname [delimiter of some sort] Fieldvalue, is this possible?  Would you need to manually edit the xml in the form to do this? Any pointers would be appreciated.
    The only options I see in the attributes of the email submit button are:
    XDP
    XML
    PDF
    URL encoded data
    Thank you,

    I have discussed this with Lori DeFurio, past Acrobat (and PDF) Developer Evangelist, and most recently, responsible for Customer & Field Enablement, who has informed me that this is possible and directed me to these forums for a resolution.
    Has anyone actually accomplished this?  Any information is appreciated.
    Thank you,

  • Amount and Date Formatting Urgent !!

    Hello Gurus,
    I want to format Amount in the below manner , I need to put this data in a text file ,
    When I read it from SAP , irrespective of whatever format
    I need to write the data in the text file in the following format
    999999999999.999
    if the amount is 12 then
    000000000012.000
    if the amount is 100 then
    000000000100.000
    Also , I need a help on date formating
    My date will always appear in the text file in the following format
    YYYY.MM.DD
    so irrespective of whatever user settings on has I need the format to appear in the text file as above.
    Please help me Points guaranteed , please try it at your end
    and please paste the code.
    rgds,
    Aryan

    Hi Aryan,
    For Amount, try out the below code...it will work fine.
    REPORT  ZAMT_DAT                                .
    TYPES amt   TYPE p DECIMALS 3.
    data : v_amt(16) type c ,
           v_amt1 type amt value 100,
           v_len type i,
           v_len1 type c,
           p_date(10) type c value '23012008'.
           v_amt = v_amt1.
           condense v_amt.
           v_len = strlen( v_amt ).
           v_len = 16 - v_len.
           do v_len times.
           concatenate '0' v_amt into v_amt.
           enddo.
           write : v_amt.
    For date, set the user settings as  below...
    system-userprofile->owndata->defaults->dateformat
    set it to the 4 th radio button....
    it will work fine.
    Thanks

  • Amount and Date Formating Urgent !!

    Hello Gurus,
    I want to format Amount in the below manner , I need to put this data in a text file ,
    When I read it from SAP , irrespective of whatever format
    I need to write the data in the text file in the following format
    999999999999.999
    if the amount is 12 then
    000000000012.000
    if the amount is 100 then
    000000000100.000
    Also , I need a help on date formating
    My date will always appear in the text file in the following format
    YYYY.MM.DD
    so irrespective of whatever user settings on has I need the format to appear in the text file as above.
    Please help me Points guaranteed , please try it at your end
    and please paste the code.
    rgds,
    Aryan

    Hi,
    Try out the following code for obtaining the date in YYYY.MM.DD format.
    data mydate like sy-datum.
    data: year(4) type c,
          month(2) type c,
          date(2) type c.
    year = mydate(4).
    month = mydate+4(2).
    date = mydate+6(2).
    write: / year no-gap, month no-gap, date.

  • Saving rights and date format in Forms - Acrobat Professional 8

    Hi Forum,
    I have designed a form for a client in Acrobat 8 Professional, and enabled viewing rights in Reader. There will be a lot of people using this form that are not in any way computer literate, and the client has requested that I do the following:
    1. I have set up the date format (in a date-of-birth field) to dd/mm/yy, limited to 8 characters, and a Tool-tip explaining how the date must be written. However, if you enter the date by mistake as 01/01/2001, it will be allowed, and appear as 01/01/20 (instead of coming up with an error message saying the 20 is wrong and it should be 01). I understand that to the form, there's nothing wrong with this date, but is there any way I can get a pop-up box to appear if either '19' or '20' appears as the year, and indicate to the form-filler that they should check what they've entered?
    2. They want the user, when the document is opened in Reader, to NOT be allowed the 'Save' feature, but only allow them to 'Save AS', so as not to overwrite the master document, which will be stored in a folder. The information in these forms are of a sensitive nature, so they don't want it getting saved by accident into the master document for anyone to see.
    I would be delighted if you were able to give me any ideas on the above.
    Kind regards,
    Liz

    For #1, you can, but it would involve some custom JavaScript programming to replace what Acrobat uses as the Keystroke/Format scripts.
    For #2, you cannot set up the document or Acrobat (Reader) to prevent a Save but allow a Save As. The best way to do what you want is to set up the appropriate file permissions using the OS's file system to prevent users from changing the file. A quick & dirty way is to simply set the file to read-only, but this is often easy for a user to undo.
    George

  • Prompt window Issues-resize and date format setting to 'mm/dd/yyyy' .

    Guys,
            I have two issues which needs to be solved for better reporting.
            I am using url reporting approach to view reports in ActiveX viewer.
            1) I have to set date format to 'mm/dd/yyyy' in parameter prompt window by default It is in yyyy-mm-dd format.
             2) I have to make prompt window with full size screen in order to accommodate more than one date parameter and make it looks better.
         Can any one tell me how to change and fix date format and resize Prompt window?
          Should I open a ticket with business object in order to solve or customize the Crystal Report Server XI R2 configurations for us?
        Please suggest me some probable options for it.
    Sincerely,
    Sanjay Patel
    Edited by: Adlyd Joseph on Feb 3, 2009 7:22 AM

    Hello Adlyd,
    SAP Business Objects does not support customizing Infoview, CR Server, or BusinessObjects Enterprise.  I'll post the content of SAP Business Objects Note 1218598 below that speaks to this.  Even if they could help customize CR Server/Enterprise/Infoview there's no way to change the parameter prompting page.  It's a page that is generated at runtime, and it isn't exposed to any of the BusinessObjects SDK.
    If you want to see if SAP Business Objects can help you with the date format that might be possible.  In North America you can call 1-800-877-2340, and select option 4, and then option 1.
    You can also purchase technical support from the [Online Store|http://store.businessobjects.com/store/bobjamer/DisplayProductByTypePage&parentCategoryID=&categoryID=11522300].
    Sincerely,
    Dan Kelleher
    NOTE: This Note was written for BOE XI and XI R2, but it applies to BOE XI 3.0 and 3.1 as well as all versions of CR Server since version XI (v11.0).
    ++++++++++++++++++
    1218598 - Support policy on customizing BusinessObjects InfoView and other applications
    Symptom
    In previous versions of Business Objects products, Business Objects Customer Support had assisted customers with the customization of the ePortfolio and InfoView applications by providing guidance on what changes were required for simple and specific custom features.
    What is the support policy for customizing BusinessObjects XI, XI Release 2, XI 3.0, XI 3.1 InfoView and the other included applications?
    Resolution
    Starting with BusinessObjects XI, code-level customization of InfoView and the other applications included with BusinessObjects XI is not supported and not recommended. These applications include Crystal Reports Explorer and the Central Management Console.
    InfoView is a fully-featured product and can be customized by changing settings in the Central Management Console or by changing values in the application configuration files only.
    Requests for custom features in InfoView or any other included applications will be treated either as enhancement requests, or in extreme cases, as product defects. Any feature that does not function as documented will be treated as a product defect.
    Custom features may also be implemented as part of an Original Equipment Manufacturer (OEM) agreement, or by engaging Business Objects Consulting Services.
    Background Information
    Modification of any of the following file types in BusinessObjects InfoView XI, XI Release 2, XI 3.0, XI 3.1 is not supported:
    .aspx
    .cs
    .vb
    .ascx
    .asax
    .jsp
    .java
    .js
    .htm
    .html
    .csp
    See Also
    For more information, please refer to the technical paper, [Customizing Look and Feel using the CMC and Style Sheets|https://www.sdn.sap.com/irj/sdn/go/portal/prtroot/docs/library/uuid/209e174d-be3e-2b10-4d8e-e25a76a6fac1].

  • SQL*LOADER and date formatted data

    Hi there, I don't want to load complex things in my table - just a simple date....
    The control file is:
    load data
    infile 'c:\data\mydata.csv'
    into table test_table
    fields terminated by "," optionally enclosed by '"'
    ( sampledate, name )
    The mydata.csv file is:
    30-12-2003, Test1
    31-12-2003, Test2
    However this format is not being accepted by the database... I tried other combinations of date (eg, 30122003, 20-DEC-2003, 30/12/2004, etc...) but always had a 'data error'
    Thanks for any suggestions.

    Example:
    Control File for Case Study 3
    This control file loads the same table as in case 2, but it loads three additional columns (hiredate, projno, and loadseq). The demonstration table emp does not have columns projno and loadseq. To test this control file, add these columns to the emp table with the command:
    ALTER TABLE emp ADD (projno NUMBER, loadseq NUMBER);
    The data is in a different format than in case 2. Some data is enclosed in quotation marks, some is set off by commas, and the values for deptno and projno are separated by a colon.
    1) -- Variable-length, delimited, and enclosed data format
    LOAD DATA
    2) INFILE *
    3) APPEND
    INTO TABLE emp
    4) FIELDS TERMINATED BY "," OPTIONALLY ENCLOSED BY '"'
    (empno, ename, job, mgr,
    5) hiredate DATE(20) "DD-Month-YYYY",
    sal, comm, deptno CHAR TERMINATED BY ':',
    projno,
    6) loadseq SEQUENCE(MAX,1))
    7) BEGINDATA
    8) 7782, "Clark", "Manager", 7839, 09-June-1981, 2572.50,, 10:101
    7839, "King", "President", , 17-November-1981,5500.00,,10:102
    7934, "Miller", "Clerk", 7782, 23-January-1982, 920.00,, 10:102
    7566, "Jones", "Manager", 7839, 02-April-1981, 3123.75,, 20:101
    7499, "Allen", "Salesman", 7698, 20-February-1981, 1600.00,
    (same line continued) 300.00, 30:103
    7654, "Martin", "Salesman", 7698, 28-September-1981, 1312.50,
    (same line continued) 1400.00, 3:103
    7658, "Chan", "Analyst", 7566, 03-May-1982, 3450,, 20:101
    Joel Pèrez
    http://otn.oracle.com/experts

Maybe you are looking for

  • Desconto de imposto retido diretamente no financeiro

    Nossa empresa possui um benefício fiscal, referente a um projeto de governo pertinente a construção civil. Devido a isso, lançamos as notas fiscais de prestação de serviço, destacando o ISS, porém o mesmo não será pago devido a esse benefício. Nesse

  • Max authz rules in ISE 1.2 ?

    Hi All, Is there any doco on what the current limit is on Auth Z rules in ISE 1.2 I have read 1.1.x had a limit of 140 authz rules. I am also considering using policy sets if that increases the total authZ rules. Cheers

  • Iphoto fails to upload book in the store. Always worked before. The book has 96 pages. Please help!

    Iphoto is unable to upload my new photo book in the store for printing. I have done it several times withouth problems. Keeps giving me the same error message "...failed asset upload...cancel order or try again". tried 10 times. Also done preview and

  • How can I download movies in Itune

    I have Windows Vista and I wanted to transfer DVD  movies that I purchased outside to all my apple products( Ipad, Ipod,Iphone). How can I do that

  • CANNOT SYNC IPHONE

    When I try to sync my Iphone with Itunes, it just shuts down with the error ''Itunes has stopped working'' . My laptop is windows vista and has not synced any iphone before this so dont really know what to do. Any suggestions ?