How to save the state of a program ?

I am working on a program, where one can open several tabs with JEditorpanes, and in the tabs one can read a webpage. I was wondering if there is a way to save the state of the program. For example the program starts with three tabs, but say that the user opens three more tabs. How would one save this info, so that it could be retrieved again when the program is restarted ?????

Check out java.util.prefs.Preferences. This is the standard API for loading/saving preferences between sessions of an application.

Similar Messages

  • How to save the output of report program??

    Hello Everbody,
    I want to save the output of a report program(i.e list),how can i do this???which function module should i use to achieve this???
    Thanx in advance.

    <b>data: list like abaplist occurs 0 with header line.
    data: begin of listout occurs 0,   
      line(1024) type c,   
      end of listout.
    do 100 times.
      write:/ sy-index.enddo.
    call function 'SAVE_LIST'
    EXPORTING*
    LIST_INDEX               = '0'
    tables 
      listobject    = list
    exceptions 
    list_index_invalid       = 1  
    others                   = 2          .
    call function 'LIST_TO_ASCI'    
    tables         
    listobject         = list    
    listasci           = listout 
       exceptions      
       empty_list         = 1    
       list_index_invalid = 2    
        others             = 3.
    call function 'GUI_DOWNLOAD' 
       exporting   
          filename = 'C:\Test.txt'  
      tables    
         data_tab = listout.</b>

  • How to save the state of the changed visible layers in pdf, pre-designed in Indesign

    Hi,
    I have made an Indesign (CS 5.5) file with some textfields (no button), and interactive buttons. And saved it as Interactive PDF.
    I have made a fillable form out of the textfields in Adobe Acrobat Pro X, and the interactive buttons are working in PDF.
    When you open the PDF in Acrobat Reader or Pro, fill in text and change a state of the button and save the file: all the changes (text and state) are saved.
    When you open the PDF in Acrobat Reader or Pro, fill in text and save the file: the changes (text) are saved.
    When you open the PDF in Acrobat Reader or Pro, and only change a state of the button and save the file: the changes are NOT saved.
    What I mean with states of a button: SHOW/HIDE or ON/OFF etc.
    Does anyone know what I'm doing wrong. Or is it not possible to only save changes in states of a button?
    Thanks in advance for thinking with me.
    Josiane

    You would have to check your color management and things like overprint settings or the ink levels of the color components. Streaking is usually a sign of areas getting oversaturated and the automatic adjustments in the printer driver being unable to compensate. and then of course other factors may figure in like banding inherent in using gradients across large areas, out of gamut issues for certain colors and what have you. You'd have to be much more specific about all of that for anyone to even begin to advise specifically...
    Mylenium

  • How to save the state of ProgrammaticLogin in serlet/JSP?

    excuse me,
    I login to Sun Java System Application Server Platform Edition 9.0_01 with ProgrammaticLogin in a servlet,and invoke security EJB.But the system show that
    I'm not login when I turn to another serelet and invoke security EJB.Should I login for every servlet?
    thanks

    Somebody please correct me if I'm wrong, but I think you need to add security constraints (in your web.xml) for every servlet/jsp you wish to access login info from. (e.g.: someservlet.getRemoteUser()).
    Actually, it's interesting that you have asked this question, because I am facing the same dilemma in my project and I am planning to save username from a secured servlet/jsp into my session and then access that attribute value from other non-secured servlets/jsps.
    This is for a forum/chat style page that I wish to have both accessible to non-registred (anonymous, but using a free handle/nickname) and registered users (using reserved handle/nickname) to prevent any user from portraying themselves as another registered user.

  • How to save the form data into adobe db?

    Hi All,
    How to save the form data into adobe db?
    I have designed one xdp file.
    Through processFormSubmission(), I got the submitted form data as Document obj.
    Then I have called the workflow kickoff program.
    code:
    InvocationRequest request = myFactory.createInvocationRequest ("myprocessname", //Specify the long-lived process name
    "invoke", //Specify the operation name
    params, //Specify input values (HashMap obj)
    false); //Create an asynchronous request
    It successfulyy started the workflow, but the submitted form data is not saved anywhere.
    And also, How get the form data from tables?
    Please provide the solution for the above.
    Thanks in advance.
    Regards,
    Saravanan G

    You need to create a process variable of type IN if you want to be able to pass data to your process. Then the params parameter (HashMap) contains a list of all the IN variables with their content that you want to pass to your process. They key is the name of the variable and the value the content. That way you should get it in your process.
    Now LiveCycle will create a column in the database for every process variable, so the content will be saved in the database just by creating that process variable.
    Jasmin

  • How to save the credentials in windows security when opening a report?

    How to save the credentials in windows security when opening a report?
    in Silverlight program, user click a link to SQL server report services link, it pops up a new IE window and ask for windows security.
    Type the user name password in and check save password. reports showed and close IE. user click again, the same windows security popup dialog showed up. how to really remember the credentials?
    If keep the IE open, reports shows in second tab of the same IE window for the second click, and it didn't ask for the windows security.

    Hi Lascorpion,
    According to your description, users need to type username and password before they can open the SSRS report when reopening IE, right? If I have anything misunderstood, please point it out.
    Base on my research, this issue offten occurs on IE9 which ships with Windows 7 operating systems. In this case, to avoid this issue we can add the report URL to the trust site, for the detail information, please refer to the link below.
    SSRS Prompt for username and password in IE
    Regards,
    Charlie Liao
    TechNet Community Support

  • How to save final states with simout

    The simout function description (html and manual) indicates that it is capable of saving initial or final states, however it does not say how to save the final states or indicate to the function how to do this. How do I indicate that I want the final states? (When I run simout, it acts like its assuming initial states).

    When you use the Simout function you are quirying the state of the model as it exists. If you did not immediately prior run a simulation then you will have the output as the initial conditions. If you want the final states then you will have to run a simulation.
    If you are doing this you may want to incorporate into your reportior the use of the resumeto and resumefrom keywords. See the following from the manual:
    Linearizing About a Final Operating Point
    To linearize a single-rate system at a certain operating point, you must first perform:
    y = sim(model,t,u)
    sys = lin(model,{resume});
    The resume keyword indicates that the linearization operating point will be the final operating point of the previous simulation. To save the operating point at th
    e end of the simulation specify the lin options resumeto=filename and resumefrom=filename.
    Alternatively, you can simulate the model until you reach the desired operating point:
    y = sim(model,t,u);
    Find the state at that operating point:
    [x] = simout(model);
    Linearize around the operating point:
    sys = lin(model,{u0=u(length(t),,x0=x})
    Now it sometimes becomes useful to obtain the operating point without running a simulation for this purpose there is a full featured trim function that is documented pretty well in the online manual... Search "trim"
    Garrett Thurston
    [email protected]
    Phone: 781.993.5540

  • How to save the string from JTextFied to database?

    can i know how to save the data from JTextFied to databse. Is it using update?

    The most straightforward way would be something like:
    String myKey=myKeyField.getText();
    String foo=fooField.getText();
    String sql="update mytable set foo='"+foo+"' where mykey='"+myKey+"'";
    connection.createStatement().executeUpdate(sql);
    This example assumes that the input fields cannot possibly contain quotes or the string won't be built correctly. Which by the way brings up a question I'd be interested in hearing others answer: What do you do about this? Sometimes I use PreparedStatement which handles that problem, other times I write my own little function to escape the string properly.
    You can also read the record into a ResultSet and use ResultSet.update(). I'm mostly using mySql and I found that in mySql ResultSet.update just creates a SQL update statement like I did above and executes it, so the only real advantage would be if you find the syntax more convenient. Perhaps other database drivers do something different that would give other pros and cons.

  • How to save the Icon  to database or .ico file?

    hi
    I get Icon instance by using
    Icon myIcon= FileSystemView.getFileSystemView().getSystemIcon(new File("J:/Program Files/XPSTool/XPSTool.exe"))
    but I not know how to save the myIcon to the database or a .ico file ;
    please help me !!!!!!!
    thanks vey much .

    Doublepost: http://forum.java.sun.com/thread.jspa?threadID=790795

  • How to save the Line position in " Mechanical Assembly Example" due to I have many models

    Hello !!
       I just learned the VB using vision tool. 
       In the  " Mechanical Assembly Example"  using the VB6.
       We can detect the mising part using the edge line detection.
       With 1 model is ok, but i want to detect many model for our parts.
       But I can not save the line detect for model by model.
       Can you help me how to save  the edge Line detection position for model by model.
       Because with 1 model, I can insert lines to detect part, but when I closed my sofware, it can not save my line.
        And if we have many model, how I can change data by model.
       By support me with source code for example.
      Thanks.
    Attachments:
    image01.png ‏16 KB

    Generally speaking, when the user interface comes up to define a line you are creating a variable that is then used for the rest of the code. You would need to save that variable and then hardcode the values into the part of the program where it is used. I can't speak specifically because I don't know the specific example. Where did you find the example. I can take a look and give you specifics if you let me know.
    Cameron T
    Applications Engineer
    National Instruments

  • I want to use Get Panel Image in Labview 5.0.1 and need details on how to save the BMP data generated

    I am trying to generate an application that saves a copy of its front panel on completion. This is easy to do using an invoke node with Print VI to HTML but this does not work in an .exe format. I have seen elsewhere that you have to use the Get Panel Image method, but no details are supplied in LV 5.0.1 documentation of how to use the "image" data (1-D Unsigned Byte array) that is generated. I want to save this in a format that can then be read as a bitmap in any standard graphics package. Any assistance?

    Hi,
    If you'd upgrade to LV5.1 or 6 you could use the 'standard' vi's for this.
    You need a VI called "Write BMP File.vi". It's not shipped with LV5.0.1.
    This vi only uses 3 subVI's, so perhaps someone at NI can convert it and
    send it to you (sorry, I won't, it's copywrited).
    If you cannot get this VI anywhere, you'll need to figure out the BMP file
    format yourself. It's not too complicated, but still could take some days.
    Perhaps someone figured it out before LV5.1 was released.
    Regards,
    Wiebe.
    "RDK" wrote in message
    news:[email protected]..
    > I want to use Get Panel Image in Labview 5.0.1 and need details on how
    > to save the BMP data generated
    >
    > I am trying to generate an application that saves a copy
    of its front
    > panel on completion. This is easy to do using an invoke node with
    > Print VI to HTML but this does not work in an .exe format. I have seen
    > elsewhere that you have to use the Get Panel Image method, but no
    > details are supplied in LV 5.0.1 documentation of how to use the
    > "image" data (1-D Unsigned Byte array) that is generated. I want to
    > save this in a format that can then be read as a bitmap in any
    > standard graphics package. Any assistance?

  • How to solve the problem when opening program illustrator cs6 ERROR: 16 It is WINDOWS 8.1 / 64 BIT help please

    how to solve the problem when opening program illustrator cs6
    ERROR: 16
    It is WINDOWS 8.1 / 64 BIT
    help please

    Thanks, Jeff! The file Adobe Setup Error.log contains the following information:
    02/14/14 07:20:26:474 | [INFO] |  | OOBE | DE |  |  |  | 8860 | DEVersion: 5.0.0.0
    02/14/14 07:20:26:475 | [INFO] |  | OOBE | DE |  |  |  | 8860 | Loading library from C:\Program Files (x86)\Common Files\Adobe\OOBE\PDApp\DECore\DE5\Setup.dll
    [    8860] Fri Feb 14 07:20:26 2014  INFO
    ::START TIMER:: [Total Timer]
    CHECK: Single instance running
    CHECK : Credentials
    Load Deployment File
    CHECK : Another Native OS installer already running
    Create Required Folders
    Assuming uninstall mode
    Lookup for master payload
    [    8860] Fri Feb 14 07:20:26 2014 ERROR
    DW040: The product "{893B3B44-0A1E-404B-8FE8-0A74509102A9}" is not installed. Cannot proceed with the uninstall
    [    8860] Fri Feb 14 07:20:26 2014  INFO
    :: END TIMER :: [Total Timer] took 6.90443 milliseconds (0.00690443 seconds) DTR = 579.338 KBPS (0.56576 MBPS)
    -------------------------------------- Summary --------------------------------------
    - 0 fatal error(s), 1 error(s), 0 warning(s)
    ERROR: DW040: The product "{893B3B44-0A1E-404B-8FE8-0A74509102A9}" is not installed. Cannot proceed with the uninstall
    Please search the above error/warning string(s) to find when the error occurred.
    These errors resulted in installer Exit Code mentioned below.
    Exit Code: 33 - The product is not installed, cannot uninstall.
    Please see specific errors and warnings for troubleshooting. For example, ERROR: DW040 ...

  • How to do the Validations in Report Programming?

    How to do the Validations in Report Programming?
    how to do screen Validations and Field Validations if posssible can any one send the code regarding the Validation ....
    Tks
    Durusoju

    AT SELECTION-SCREEN - selscreen_event
    Syntax
      | { ON {para|selcrit} }
      | { ON END OF selcrit }
      | { ON BLOCK block }
      | { ON RADIOBUTTON GROUP radi }
      | { }
      | { ON {HELP-REQUEST|VALUE-REQUEST}
      |   FOR {para|selcrit-low|selcrit-high} }
      | { ON EXIT-COMMAND }.
    Alternatives:
    1. ... OUTPUT
    2. ... ON {para|selcrit}
    3. ... ON END OF selcrit
    4. ... ON BLOCK block
    5. ... ON RADIOBUTTON GROUP radi
    6. ... { }
    7. ... ON {HELP-REQUEST|VALUE-REQUEST} FOR
          {para|selcrit-low|selcrit-high} }
    8. ... ON EXIT-COMMAND
    Effect
    These additions allow individual evaluation of specific elements of the selection screens of the program. The information as to which selection has triggered the event is contained in the system field sy-dynnr.
    Alternative 1
    ... OUTPUT
    Effect
    This event is triggered at the screen event PBO of a selection screen. In the event block, the selection screen can be prepared through assignments to the data objects of parameters and selection criteria and through dynamic screen modifications.
    Note
    The assignments to input fields in the event block AT SELECTION-SCREEN OUTPUT always affect the selection screen and overwrite the user inputs from previous displays of the same selection screen. Assignments in the event blocks LOAD-OF-PROGRAM oder INITIALIZATION, on the other hand, only have an effect at first program start.
    Alternative 2
    ... ON {para|selcrit}
    Effect
    This event is triggered at the screen event PAI of a selection screen if the content of the input field of a parameter para or a line of a selection criterion selcrit was passed to the ABAP program. In the event block, the user input can be checked. Sending a warning or an error message in the event block makes the fields para and selcrit ready for input again.
    No parameter that is defined as a radio button can be specified. For this purpose, the addition ON RADIOBUTTON GROUP is provided.
    Note
    If a user action takes place in the dialog box for the multiple selection of a selection criterion selcrit, the entries of the selection table are passed to the program, line by line. For each line, the event AT SELECTION-SCREEN ON selcrit is triggered.
    Alternative 3
    ... ON END OF selcrit
    Effect
    This event is triggered after the selection table selcrit has been fully passed to the program after a user action in the dialog box for the multiple selection has taken place. In the event block, the entire selection table can be checked.
    Alternative 4
    ... ON BLOCK block
    Effect
    This event is triggered at the screen event PAI of a selection screen if all the input fields of a block block of the selection screen were passed to the ABAP program. In the event block, the user inputs can be checked. Sending a warning or an error message in the event block makes all the fields of the block block ready for input again.
    Alternative 5
    ... ON RADIOBUTTON GROUP radi
    Effect
    This event is triggered at the screen event PAI of a selection screen if all the fields of a radio button group radi of the selection screen were passed to the ABAP program. In the event block, the user input can be checked. Sending a warning or error message in the event block makes all the radion buttons of the block radi ready for input again.
    Note
    The individual fields of a radio button group are not passed individually and do not trigger the event AT SELECTION-SCREEN ON par.
    Alternative 6
    Effect
    The event AT SELECTION-SCREEN itself is triggered as the last event of selection screen processing if all the input values were passed to the program. In this event block, all the user inputs can be checked. Sending a warning or an error message in the event block makes all the screen fields ready for input once again.
    Alternative 7
    ... ON { HELP-REQUEST | VALUE-REQUEST } FOR
        {para|selcrit-low|selcrit-high} }
    Effect
    The two events ON HELP-REQUEST and ON VALUE-REQUEST are triggered at the screen events POH and POV of a selection screen if - for the input field of a parameter para or one of the input fields of a selection criterion selcrit - the field help F1 or the input help F4 was called. Other selection events are not triggered.
    In the event blocks, a self-defined field or input field can be programmed, which overrides any helps possibly defined in the ABAP Dictionary.
    Notes
    These event blocks can only be implemented for fields of the selection screen that are defined in the same ABAP program and not in a possibly linked logical database.
    With the events for the field and input help, no data is transported between the selection screen and the ABAP program. As with general screens, suitable function modules must be used for these. The parameters and selection criteria changed for the input help are transported to the selection screen.
    Alternative 8
    ... ON EXIT-COMMAND
    Effect
    This event is triggered if the user has called one of the functions Back, Exit or Cancel. In the event block, possible clean-up actions can be executed.
    Example
    In these executable programs, a standard selection screen and a further selection screen are defined. In the event blocks AT SELECTION-SCREEN, the inputs in the selection screens can be specially handled using the name p_carrid and the screen number in sy-dynnr.
    REPORT demo_at_selection_screen.
    Global data
    DATA: sflight_tab TYPE TABLE OF sflight,
          sflight_wa  LIKE LINE  OF sflight_tab.
    Selection screens
    PARAMETERS p_carrid TYPE spfli-carrid.
    SELECTION-SCREEN BEGIN OF SCREEN 500.
      SELECT-OPTIONS s_conn FOR sflight_wa-connid.
      DATA s_conn_wa LIKE LINE OF s_conn.
    SELECTION-SCREEN END OF SCREEN 500.
    Handling selection screen events
    AT SELECTION-SCREEN ON p_carrid.
      IF p_carrid IS INITIAL.
        MESSAGE 'Please enter a value' TYPE 'E'.
      ENDIF.
      AUTHORITY-CHECK OBJECT 'S_CARRID'
                          ID 'CARRID' FIELD p_carrid
                          ID 'ACTVT'  FIELD '03'.
      IF sy-subrc = 4.
        MESSAGE 'No authorization for carrier' TYPE 'E'.
      ELSEIF sy-subrc <> 0.
        MESSAGE 'Error in authority check' TYPE 'A'.
      ELSE.
        IF sy-ucomm = 'ONLI'.
          CALL SELECTION-SCREEN '0500'.
        ENDIF.
      ENDIF.
    AT SELECTION-SCREEN.
      IF sy-dynnr = '0500'.
        IF s_conn IS INITIAL.
          MESSAGE 'Please enter values' TYPE 'W'.
        ELSE.
          SELECT *
                 FROM sflight
                 INTO TABLE sflight_tab
                 WHERE carrid = p_carrid AND
                       connid IN s_conn.
          IF sy-subrc <> 0.
            MESSAGE 'No flights found' TYPE 'E'.
          ENDIF.
        ENDIF.
      ENDIF.
    Main program
    START-OF-SELECTION.

  • How to save the output of sap script to pdf document in sap

    hi abapers
    how to save the output of sap script in sap so that can retrieve the saved document later.
    i have to save the rcia output from sap script in pdf document in sap so that it can be retrieved later
    how to use dms

    Hi deepika,
    This thread will solve ur problem OTF  -> PDF
    Regards,
    Pravin

  • How to save the setting in MDM import manager?

    How to save the setting in MDM import manager? After I configure all things in MDM import manager, I try to save the setting, let's say, saved map name is " Test002", and then I export this map into desktop. After that, I logon Import manager again, and import this map file, system show me the same thing that I have to configure it again, because nothing was changed, what I configured before, were all disappeared.

    Hi Alfred ,
    are You not saving this map in Import Manager ? Import Manager itslef saves the map and remember it . Exporting map is only for backup .
    Pls make changes and save the map . Exit and relogin . then see the map . It should be there . Pls let us know the result .
    - An

Maybe you are looking for