Creating new components for a new JTab

Collapse
This topic is closed.
X
X
 
  • Time
  • Show
Clear All
new posts
  • - ions

    Creating new components for a new JTab

    hi, just wondering how i could create a new JTextArea to be added to a
    new Tab in a JTabbedPane. ie. every time a ActionEvent is fired
    (menuItem) it creates a new TextArea which the new Tab holds
  • Joe Randstein

    #2
    Re: Creating new components for a new JTab

    negative_ions_0 @hotmail.com (- ions) wrote in message news:<4799447d. 0401061730.7c16 811f@posting.go ogle.com>...[color=blue]
    > hi, just wondering how i could create a new JTextArea to be added to a
    > new Tab in a JTabbedPane. ie. every time a ActionEvent is fired
    > (menuItem) it creates a new TextArea which the new Tab holds[/color]

    inside the ActionListener:

    JTextArea ta= new JTextArea();
    myTabbedPane.ad d(ta);

    Comment

    Working...