Forums Register Login

Singleton Pattern

+Pie Number of slices to send: Send
Can I use the Singleton Pattern to switch between the screens(JFrames ) in the Application ?
+Pie Number of slices to send: Send
Please provide a more detailed question.
+Pie Number of slices to send: Send
It's not clear to me how you would do that. But in general: if you're thinking about using the Singleton pattern anywhere, think again. It's one of the most abused patterns around. Use it only for classes which simply break if you have more than one instance, not for classes where you happen to need only a single instance.
- Peter
What are you saying? I thought you said that Santa gave you that. And this tiny ad:
a bit of art, as a gift, the permaculture playing cards
https://gardener-gift.com


reply
reply
This thread has been viewed 838 times.
Similar Threads
Static methods Vs "Instance Methods"
how to make single instance of a class?
running only one instance of java program
Limited no of Objects
Hibernate SessionFactory is initialized/read with every EJB call
More...

All times above are in ranch (not your local) time.
The current ranch time is
Mar 28, 2024 19:39:49.