private void createInfoWindow(){
  infoWindow=new JWindow(SwingUtilities.getWindowAncestor(textField));
  infoLabel=new JLabel();
  infoWindow.add(infoLabel);
  JPanel contentPane=(JPanel)infoWindow.getContentPane();
  Border border=BorderFactory.createCompoundBorder(BorderFactory.createLineBorder(Color.GRAY),BorderFactory.createEmptyBorder(2,4,2,4));
  contentPane.setBorder(border);
  contentPane.setBackground(HtmlColors.decode("#EEEEEE"));
  infoLabel.setFont(textField.getFont());
  containingWindow=SwingUtilities.getWindowAncestor(textField);
  if (containingWindow != null) {
    containingWindow.addComponentListener(componentListener);
  }
  textField.addComponentListener(componentListener);
}

private void createInfoWindow ( ) { infoWindow = new JWindow ( SwingUtilities . getWindowAncestor ( textField ) ) ; infoLabel = new JLabel ( ) ; infoWindow . add ( infoLabel ) ; JPanel contentPane = ( JPanel ) infoWindow . getContentPane ( ) ; Border border = BorderFactory . createCompoundBorder ( BorderFactory . createLineBorder ( Color . GRAY ) , BorderFactory . createEmptyBorder ( 2 , 4 , 2 , 4 ) ) ; contentPane . setBorder ( border ) ; contentPane . setBackground ( HtmlColors . decode ( "#EEEEEE" ) ) ; infoLabel . setFont ( textField . getFont ( ) ) ; containingWindow = SwingUtilities . getWindowAncestor ( textField ) ; if ( containingWindow != null ) { containingWindow . addComponentListener ( componentListener ) ; } textField . addComponentListener ( componentListener ) ; }
creates the window for the info popup . this should only be run once and then reused , only changing the text and size .
