i've class project with textfilds id,name.no...

when i click ok here another window (another class) opens with same fields but not editable.
and when i submit here data goes to db.

then how to get values of textfields in project class into current class which i've to send to db..

plz reply..

9 Years
Discussion Span
Last Post by Ezzaral

I am sorry for not speaking Martian. That's why I don't understand what you are saying. Try to post again your question. With more details and better explanation


Thks for reply
sending detail

I am using java swing to develop an application..

class1- which contain some TextFields, TextAreas and buttons. here is a ok button. when i click on the ok, another window opents which is another class-class2 developed using swing having all same fields in prev class1 but should not be editable. and here in class2 i m having submit button which submits data into db..

now what i want is--
want to access the fields in the class1 with their valus into next class2 so that i can send them to db.

so how should i do that..



How should i pass them as arguments ..
can u give me example


Don't you know how to create constructors or methods with arguments.
Just create a method that takes its arguments and sets them as values in the text fields of your class2. Or when you call class2 give those values in the constructor of class2


Why on earth would you have two separate classes for that? Why does the first class not submit to the database?
Post the code that you have written also. You do have some, yes?

This topic has been dead for over six months. Start a new discussion instead.
Have something to contribute to this discussion? Please be thoughtful, detailed and courteous, and be sure to adhere to our posting rules.