File APIs for Java Developers
Manipulate DOC, XLS, PPT, PDF and many others from your application.
http://aspose.com/file-tools
The moose likes Swing / AWT / SWT and the fly likes Jtable data passing one frame to another frame Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


Win a copy of The Java EE 7 Tutorial Volume 1 or Volume 2 this week in the Java EE forum
or jQuery UI in Action in the JavaScript forum!
JavaRanch » Java Forums » Java » Swing / AWT / SWT
Bookmark "Jtable data passing one frame to another frame" Watch "Jtable data passing one frame to another frame" New topic
Author

Jtable data passing one frame to another frame

Ruchira Kariyawasam
Greenhorn

Joined: Jul 23, 2011
Posts: 2
Hi,

I am very new to this this. But want to resolve this java swing problem asap.

I have two jframes in two classes. First one is customer and second frame is Sales form. I want to fill some textfields in the sales class from the customer jtable(that in the customer class).

Once the getCustomerDetails jbutton click in sales class, customer class should visible with customer jtable. And selected row data in customer table should come to the sales form and update sales class text fields.


Both sales and Customer classes extends jframe. And im using beans binding to get the selected row from the jtable. I know that i have to use mouseListner event to perform this, But do not know to use this for this.

Please let me know how can I perform this. Im using netbeans IDE to generate the GUI.
In the customerTable is selected index property use to get the correct index of customerList (ArrayList)

Hope community feedback soon. Here I have illustrated sales class, Customer class and pojo class sample coding with this.

Sales class


Customers class




Here pojo class is CustomerPOJO.





Ruchira Kariyawasam
Greenhorn

Joined: Jul 23, 2011
Posts: 2
Please assume that i have filled sales jtable from database, and its having data.

 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: Jtable data passing one frame to another frame