How do I implement a password that users can change in another window in Java Swing

The program I’m designing allows users to change an admin password ONLY AFTER entering the current admin password into a password field in the class setupModeLock below. However, the password never saves to the setupModeLock variable pWord

import javax.swing.*;
import java.awt.event.*;
public class setupModeLock {
    private static int pWord;
    public final JFrame miniScreen;
    setupModeLock() {
        miniScreen = new JFrame("Setup Mode");
        final JLabel info = new JLabel("Please enter an admin password");
        final JPasswordField adminField = new JPasswordField();
        final JLabel result = new JLabel("");
        info.setBounds(120, 300, 200, 30);
        adminField.setBounds(120, 325, 200, 30);
        result.setBounds(200, 325, 400, 30);
        miniScreen.add(info);
        miniScreen.add(adminField);
        miniScreen.add(result);
        adminField.addActionListener(new ActionListener() {
            public void actionPerformed(ActionEvent code) {
                String password = new String(adminField.getPassword());
                try {
                    int val = Integer.parseInt(password);
                    if(val == pWord) 
                    {       
                        miniScreen.dispose();
                        new setUpMode()
                    }
                    else
                    {
                        adminField.setText("");
                        result.setText("Incorrect Password");
                    }
                } catch (Exception e) {
                    adminField.setText("");
                    result.setText("Invalid Password");
                }
            }
        });
        miniScreen.setSize(780,700);
        miniScreen.setVisible(true);
        miniScreen.setDefaultCloseOperation(JFrame.DISPOSE_ON_CLOSE);
    }
    public static void changePassword(int newPass)
    {
        pWord = newPass;
    }
    public static int getPword()
    {
        return pWord;
    }
}

The next class actually displays the button that changes the password

import javax.swing.*;
import java.awt.event.*;
public class setUpMode extends setupModeLock{
    public JFrame window;
    setUpMode() {
        super();
        miniScreen.dispose();
        window = new JFrame();
        window.setAlwaysOnTop(true);
        JButton modPassword = new JButton("Change Admin Password");
        modPassword.setBounds(1000, 800, 300, 30);
        window.add(modPassword);
        modPassword.addActionListener(new ActionListener() {
            public void actionPerformed(ActionEvent c) {
                new PasswordChanger();
            } 
        });
    }
}

In the class PasswordChanger, the user enters the password to the PasswordField, and then uses the inherited method changePassword to change the password in setUpModeLock

import javax.swing.*;
import java.awt.CardLayout;
import java.awt.Container;
import java.awt.event.ActionEvent;
import java.awt.event.ActionListener;
public class PasswordChanger extends setupModeLock implements ActionListener {
    JPasswordField thisField;
    JLabel success;
    Container container;
    CardLayout cardlayout;

    PasswordChanger() {
        super();
        miniScreen.dispose();
        JFrame newPlace = new JFrame("Change Password");
        container = newPlace.getContentPane();
        cardlayout = new CardLayout();
        container.setLayout(cardlayout);
        success = new JLabel("");
        thisField = new JPasswordField();
        thisField.addActionListener(this);
        container.add("a", thisField);
        container.add("b", success);
        newPlace.setSize(300,100);
        newPlace.setVisible(true);
        newPlace.setLocationRelativeTo(null);
        newPlace.setDefaultCloseOperation(JFrame.DISPOSE_ON_CLOSE);
    }
    public void actionPerformed(ActionEvent bro) {
        val = new String(thisField.getPassword());
        try
        {
            int pCode = Integer.parseInt(val);
            changePassword(pCode);
            success.setText("Password successfuly save. Exit now");
        } catch(Exception e) {
            success.setText("Faulty Password type. Exit and try again");
        }
        cardlayout.next(container);
    }
}

But after running it, not even the Change Password JButton appears in setupMode.

I tried inheriting over multiple classes, but my password always remains at 0. What can I do to modify the password in setUpModeLock so that any call to changePassword() will make the new password a constant in all subclasses.

Trang chủ Giới thiệu Sinh nhật bé trai Sinh nhật bé gái Tổ chức sự kiện Biểu diễn giải trí Dịch vụ khác Trang trí tiệc cưới Tổ chức khai trương Tư vấn dịch vụ Thư viện ảnh Tin tức - sự kiện Liên hệ Chú hề sinh nhật Trang trí YEAR END PARTY công ty Trang trí tất niên cuối năm Trang trí tất niên xu hướng mới nhất Trang trí sinh nhật bé trai Hải Đăng Trang trí sinh nhật bé Khánh Vân Trang trí sinh nhật Bích Ngân Trang trí sinh nhật bé Thanh Trang Thuê ông già Noel phát quà Biểu diễn xiếc khỉ Xiếc quay đĩa Dịch vụ tổ chức sự kiện 5 sao Thông tin về chúng tôi Dịch vụ sinh nhật bé trai Dịch vụ sinh nhật bé gái Sự kiện trọn gói Các tiết mục giải trí Dịch vụ bổ trợ Tiệc cưới sang trọng Dịch vụ khai trương Tư vấn tổ chức sự kiện Hình ảnh sự kiện Cập nhật tin tức Liên hệ ngay Thuê chú hề chuyên nghiệp Tiệc tất niên cho công ty Trang trí tiệc cuối năm Tiệc tất niên độc đáo Sinh nhật bé Hải Đăng Sinh nhật đáng yêu bé Khánh Vân Sinh nhật sang trọng Bích Ngân Tiệc sinh nhật bé Thanh Trang Dịch vụ ông già Noel Xiếc thú vui nhộn Biểu diễn xiếc quay đĩa Dịch vụ tổ chức tiệc uy tín Khám phá dịch vụ của chúng tôi Tiệc sinh nhật cho bé trai Trang trí tiệc cho bé gái Gói sự kiện chuyên nghiệp Chương trình giải trí hấp dẫn Dịch vụ hỗ trợ sự kiện Trang trí tiệc cưới đẹp Khởi đầu thành công với khai trương Chuyên gia tư vấn sự kiện Xem ảnh các sự kiện đẹp Tin mới về sự kiện Kết nối với đội ngũ chuyên gia Chú hề vui nhộn cho tiệc sinh nhật Ý tưởng tiệc cuối năm Tất niên độc đáo Trang trí tiệc hiện đại Tổ chức sinh nhật cho Hải Đăng Sinh nhật độc quyền Khánh Vân Phong cách tiệc Bích Ngân Trang trí tiệc bé Thanh Trang Thuê dịch vụ ông già Noel chuyên nghiệp Xem xiếc khỉ đặc sắc Xiếc quay đĩa thú vị
Trang chủ Giới thiệu Sinh nhật bé trai Sinh nhật bé gái Tổ chức sự kiện Biểu diễn giải trí Dịch vụ khác Trang trí tiệc cưới Tổ chức khai trương Tư vấn dịch vụ Thư viện ảnh Tin tức - sự kiện Liên hệ Chú hề sinh nhật Trang trí YEAR END PARTY công ty Trang trí tất niên cuối năm Trang trí tất niên xu hướng mới nhất Trang trí sinh nhật bé trai Hải Đăng Trang trí sinh nhật bé Khánh Vân Trang trí sinh nhật Bích Ngân Trang trí sinh nhật bé Thanh Trang Thuê ông già Noel phát quà Biểu diễn xiếc khỉ Xiếc quay đĩa
Thiết kế website Thiết kế website Thiết kế website Cách kháng tài khoản quảng cáo Mua bán Fanpage Facebook Dịch vụ SEO Tổ chức sinh nhật