Click here to Skip to main content
15,892,737 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
See more:
here is my button click event
Java
private void OK_BtnActionPerformed(java.awt.event.ActionEvent evt) {
        // TODO add your handling code here:
        Box1 = User_Name.getText();
        Box2 = User_Password.getText();


    }

so now i want to access this Box1 value in another class?

i did like this?

Visa_Request newVR = new Visa_Request();
String u_2name = newVR.Box1;

this is in seperate class and
but it doesn't work?
Posted
Comments
Richard MacCutchan 18-Nov-15 8:10am    
Create getter methods that return the values, and call those methods in the other class.

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900