Win a copy of The Little Book of Impediments (e-book only) this week in the Agile and Other Processes forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

JTable problem using the same reference

 
Andras Nemeth
Ranch Hand
Posts: 80
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi All,
In my GUI, I want to use the same JTable at the "search" and the "book" panels... (I use JTabbedPane and put these JPanels on it)
So, I made a mediator class which instantiate the JTable with my own TableModel.
In both (search and book) pane I ask the reference of JTable from the Mediator class when display the pane.
Problem: only one pane can show this JTable! The last one which asked for the reference.
Is there anything what I missed?
I can paste a short code here if it is needed for make it clearer.
I look forward to reading your answer.
Thanks a lot.
Br,
Ban
 
Andras Nemeth
Ranch Hand
Posts: 80
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Meanwhile, I got light! I can not add one
reference of JComponent to two panel.
The add method will remove the previous one!
I managed to solve the problem with common
TableModel and ListSelectionModel, but two
JTable instance.
Br,
Ban
PS: I also close the thread in absence of interest. :P
 
Andras Nemeth
Ranch Hand
Posts: 80
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi,
At least, I thought I close the topic, but...
I am so little grain of dust here, that I am not allowed to do that. So, bartenders and other demigods , please, do it.
Cheers,
Ban
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic