title: Design inquiry: Choosing between Singleton, Factory, etc
body: <p>I have read the book <em>First Java: Design Patterns</em> and am a newbie.</p>
  
  <p>I'm making my own game engine just for practice and I'm using Singleton Pattern (I know that's a sin for most of you) to create unique classes like: InputManager, ScreenManager, GameManager, etc. I really find it useful, but I don't want to go against the current. </p>
  
  <p>Is it wiser maybe to use the Factory Method to create this classes (maybe creating them as inner classes) and then pass those objects to whatever class needs them?</p>
  
  <p>Is that bad practice too?</p>
  
  <p>I just want to make sure that there's one instance of those unique classes and only one way to access them.</p>
  
  <p>Maybe something like:</p>
  
  <pre><code>public final class Factory(){
  private static final InputListener inputlst = new InputListener();  
  private static final Screen window = new Screen();
  private static final GameManager gameManager = new GameManager();
  public Factory(){
  }
  public static InputListener getInputListener(){
      return inputlst;
  }
  public static Screen getWindow(){
      return window;
  }
  private static class InputListener implements KeyListener, MouseListener, MouseMotionListener, MouseWheelListener{      
  }
  private static class Screen extends JFrame{
  }
  private static class GameManager{
  }
  </code></pre>