title: how to access one JFrame to another class JFrame
body: <p>I have a problem.</p>
  <p>I am creating two JFrames in different classes in the same package in eclipse. In the first JFrame class I have different JButtons for different uses.</p>
  <p>In the first JButton, the name is &quot;View user profile&quot; after clicking this button some event is performed. the event occurs when the button is pressed that is another JFrame visible and this JFrame shows all user information which user is login. but this JFrame not show all the user details present in the database.</p>
  <p>Because this showing an error for accessing another class (JFrame) variable like JButton, JLabel, etc.</p>
  <p>Please help me.  How can I access different class variables in another class.</p>