I'm using Netbeans IDE if that helps
That is a problem because Netbeans uses none standard classes that are not available to non-Netbeans users.
For example: org.netbeans.lib.awtextra.AbsoluteConstraints
Also the IDE builds the contents of the classes, making it hard to modify.
i want to go to the second tab in the second jframe
To call a method in another class, you need the reference to an instance of the class.
Where is the reference to the second jframe class?
To go to a tab in a JTabbedPane, you need to call a method for that class the tells it what component to go to.
Normally those methods are named with a name starting with set. Read the API doc to find what method to use.
Then write a method in the second frame class that calls that method.
Then in the first frame class, call that method using the reference to the instance of the second class.