When create a GUI class I’m find a problem of access to the variables in another class using a universal procedure. Here is my solution to the problem :) package testexample;…