3 Replies Latest reply: Jun 18, 2010 7:52 AM by 791266 RSS

    Serializing JFrame

    843790
      Hello,
      I need to know if it is possibile to serialize and save my application (called NewJFrame in NetBeans environment) and then recall it when wanted just from a running instance of NewJFrame itself.
      When I load the object what methods I have to call? Have I to close the running NewJFrame?
      Thanks in advance for your help.
        • 1. Re: Serializing JFrame
          843790
          Once you deserialized a JFrame you show it the same way you show a JFrame created the "normal" way.

          Also: Serializing Swing components is not a good approach for persistence in an application. It's a much better idea to separate your model from your view and controller and to persist the model alone (using serialization or another technique).
          • 2. Re: Serializing JFrame
            843790
            Excuse me,
            I just run my application so it is the system that shows my NewJFrame. I do not know which is the suitable method to call.
            Thanks for your patience.
            • 3. Re: Serializing JFrame
              791266
              P5music wrote:
              Excuse me,
              I just run my application so it is the system that shows my NewJFrame.
              Huh?