File APIs for Java Developers
Manipulate DOC, XLS, PPT, PDF and many others from your application.
The moose likes Swing / AWT / SWT and the fly likes Jtable problem Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login
JavaRanch » Java Forums » Java » Swing / AWT / SWT
Bookmark "Jtable problem" Watch "Jtable problem" New topic

Jtable problem

Haris Tasawar
Ranch Hand

Joined: Aug 19, 2011
Posts: 30
Hey all,
I am having trouble showing jtable on button click. Let me explain:

I have 2 buttons who specifically show 2 different tables on button:

1. 1st one (on click) shows the supplier information.
2. 2nd one (on click) show the product information.

The problem is whenever i click on any button for example the supplier button, it displays the respected Jtable, and when i click on the other button (i.e the product infor button) it displays the respected jtable also BUT when i click inside the table or highlight the implemented operation (i.e add,edit,delete) the values in the jtable changes to the previous Jtable values(supplier table) and the if i highlight the buttons they also change to the previous implementations of the buttons(add supplier,edit supplier, etc). i cant figure out how to solve this issue.
Is it happening because i am doing this on the same Jrame???

Please Help.

Michael Dunn
Ranch Hand

Joined: Jun 09, 2003
Posts: 4632
> i cant figure out how to solve this issue.

find someone with a crystal ball, or post some code.

create a small demo program (one that compiles/runs)
just a frame, 2 buttons, 2 tables (1 row x 1 colum each),
and the code to add a supplier, and post that code here.

and, make sure it has the same problem.
I agree. Here's the link:
subject: Jtable problem
jQuery in Action, 3rd edition