This week's book giveaway is in the Kotlin forum.
We're giving away four copies of Kotlin for Android App Development and have Peter Sommerhoff on-line!
See this thread for details.
Win a copy of Kotlin for Android App Development this week in the Kotlin forum!
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Liutauras Vilda
  • Devaka Cooray
  • Jeanne Boyarsky
  • Bear Bibeault
Sheriffs:
  • Junilu Lacar
  • Paul Clapham
  • Knute Snortum
Saloon Keepers:
  • Ron McLeod
  • Tim Moores
  • Stephan van Hulst
  • salvin francis
  • Carey Brown
Bartenders:
  • Tim Holloway
  • Frits Walraven
  • Ganesh Patekar

Regarding How to get the Selected Cell values in JTable  RSS feed

 
Greenhorn
Posts: 5
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi Friends,

I have one doubt in JTable.

i.e.How to get the Other than Selected Cell values in JTable.

Suppose i select Cell position is, Column 4,Row 7.

I am using below code i am getting the value.It is Fine.


My Issue is,
I am struggling at to get the Other Column Values. I am struggling at how to get those values.

i.e. When ever i select Column 4,Row 7,I need to get the value of Column 1,Row 7 Value and Column 5,Row 7 Value.

Please give me idea. How to proceed from here.

This is urgent.

Thanks,
Vasu
 
Bartender
Posts: 1104
10
Java Netbeans IDE Ubuntu
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Please UseCodeTags when posting code. I have added it for you this time. Remember that people here are volunteering their time to help you. So EaseUp.

As for your problem, you should ListSelectionListener to listen for selection events and not mouse events. You can read about Selection Listeners here.

To get a particular cell value, you can use the getValueAt(row, col) method in the JTable.
 
Vasu mallipeddi
Greenhorn
Posts: 5
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Thank You Ranganathan ,

For giving of Replay and Code USe Tags thing .

Thanks,
Venkata.
 
Ranganathan Kaliyur Mannar
Bartender
Posts: 1104
10
Java Netbeans IDE Ubuntu
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
You're welcome.
 
All of the world's problems can be solved in a garden - Geoff Lawton. Tiny ad:
RavenDB is an Open Source NoSQL Database that’s fully transactional (ACID) across your database
https://coderanch.com/t/704633/RavenDB-Open-Source-NoSQL-Database
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!