Win a copy of Mesos in Action this week in the Cloud/Virtualizaton forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

Multiple components in cell of a JTable

 
Sanjeev Charla
Ranch Hand
Posts: 90
Firefox Browser Ubuntu
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
A cell in JTable contains a JPanel. This JPanel contains some other components ( a radio button, lablel . . .).
Using AbstractCellEditor ,TableCellRenderer,TableCellEditor this is achieved.
I am returning the JPanel as the Component to be set in the table cell.
But the events (mouse clicking . . .) reaches to JPanel only . . . the inner components are not effected by the mouse events . . .
How to achieve this . . .??

Thank you . . .
 
Andrey Kozhanov
Ranch Hand
Posts: 79
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
I believe you have to dispatch your events to component under mouse pointer manually. Using component's 'dispatchEvent' function.
 
Sanjeev Charla
Ranch Hand
Posts: 90
Firefox Browser Ubuntu
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Thank you for your response . . .
I have been waiting for a solution to achieve this task . . .
I have the same idea in my mind to dispatch events from the top container to individual inner components based on the position of the mouse . . .
I am searching for some other solution if possible . . .
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic