I want to write some text to JtextArea of class1 from class2 . How can i do that? Thanx in advance for any suggestion

You can pass it to the other class either through a constructor or method call in the second class or you can make it public in the original class.

Create a public method in class1 that accepts the text as a parameter and updates the test area as required. From class2, just call that method.

thanx

Be a part of the DaniWeb community

We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.