Title: JPopupMenu

Ok, I have a JPopupMenu to which,
I add a JTextArea
I use the following action listener to change the string shown in the textfield.
Now, it works the first time, but once I change the string, it stops working.
It just shows a verticle line.

now, if I set the prefferedsize of the JTextArea, it works just fine.
But I want the size to match the text entered.

aaron


  class PopupListener implements ActionListener
  {
      String helpString;
      public PopupListener(String str)
      {
        helpString = str;
      }
      public void actionPerformed(ActionEvent evt)
      {
        popupText.setText(helpString);
        infoPopup.show((Component)evt.getSource(), 0, 0);
      }

  }

Reply via email to