This discussion is archived
1 Reply Latest reply: Nov 11, 2011 6:12 AM by Narayan RSS

Cache javaxf objects

899704 Newbie
Currently Being Moderated
I have a floor plan created by Javafx objects on which I animate a circle.Is there a way to cache the FloorPlan object in Javafx so that I dont need to recreate it any time I need it?

Thanks in advance.
  • 1. Re: Cache javaxf objects
    Narayan Pro
    Currently Being Moderated
    If you are good on Object Oriented Concept then it's not a big deal.To save the object and use them anytime make them static
    For example:
    public class SomeClass{
         public static MyClass myObject = new MyClass();
    
         //Now use the object at anytime anywhere. The object will saved in the VM within the lifetime of Application.
    }
    Thanks.
    Narayan

Legend

  • Correct Answers - 10 points
  • Helpful Answers - 5 points