1 Reply Latest reply on May 2, 2014 8:47 AM by gimbal2

    JTabbedPane and one Button for all Tabs


      Hello everybody,


      im new here an would say HELLOOO to everyone


      So ive got an issue.


      I am creating in "class A"  tabs for a JTabbedPane. In "class B" i create the JTabbedPane and creat instances of class A and add them to the TabbedPane.


      in Class B i also create a button, for save actions. When i click the button, a method "save()" will be called and read from every tab the Strings out of textfields.


      My problem now is, that it dont work, i call the save method with the instance from the tab, but it dont getText() from the textfield.


      For example:


      //create an instance tab, parameter is the save file

      Tab myTab = new Tab(file);


           //other code


      (Tab)myTab.save(); //here i eclipse cast to Tab automatically


      the save-Method in class A (Tab):


      save() {





      BTW how can i highlight code in this forum?