the constructor with String of the JFrame class is obviously public, so why not inherit it to the subclass?
import javax.swing.*;
public class test extends JFrame
{    
    public test() {
        // TODO 
    }
    public static void main(String[] args) {
        JFrame frame=new test("123");
    }
    
}