private InternalManagedWindow buildQuitDialog(){
  JComponent content=new JComponent(){
  }
;
  content.setLayout(new GridLayout(1,2,PADDING,PADDING));
  content.setBorder(BorderFactory.createEmptyBorder(PADDING,PADDING,PADDING,PADDING));
  content.setFocusCycleRoot(true);
  content.setFocusTraversalPolicy(new LimitingFocusTraversalPolicy());
  yesButton=new JButton();
  yesButton.setText("Yes");
  yesButton.setMnemonic(KeyEvent.VK_Y);
  yesButton.addActionListener(new QuitConfirmCB());
  content.add(yesButton);
  JButton noButton=new JButton();
  noButton.setText("No");
  noButton.setMnemonic(KeyEvent.VK_N);
  noButton.addActionListener(new QuitCancelCB());
  content.add(noButton);
  InternalManagedWindow window=new InternalManagedWindow("quit","Quit");
  window.setContent(content);
  window.setMinimizable(false);
  window.setHideOnClose(true);
  window.setMovable(false);
  return window;
}

private InternalManagedWindow buildQuitDialog ( ) { JComponent content = new JComponent ( ) { } ; content . setLayout ( new GridLayout ( 1 , 2 , PADDING , PADDING ) ) ; content . setBorder ( BorderFactory . createEmptyBorder ( PADDING , PADDING , PADDING , PADDING ) ) ; content . setFocusCycleRoot ( true ) ; content . setFocusTraversalPolicy ( new LimitingFocusTraversalPolicy ( ) ) ; yesButton = new JButton ( ) ; yesButton . setText ( "Yes" ) ; yesButton . setMnemonic ( KeyEvent . VK_Y ) ; yesButton . addActionListener ( new QuitConfirmCB ( ) ) ; content . add ( yesButton ) ; JButton noButton = new JButton ( ) ; noButton . setText ( "No" ) ; noButton . setMnemonic ( KeyEvent . VK_N ) ; noButton . addActionListener ( new QuitCancelCB ( ) ) ; content . add ( noButton ) ; InternalManagedWindow window = new InternalManagedWindow ( "quit" , "Quit" ) ; window . setContent ( content ) ; window . setMinimizable ( false ) ; window . setHideOnClose ( true ) ; window . setMovable ( false ) ; return window ; }
build the in - window quit dialog .
