Search...
FAQs
Subscribe
Pie
FAQs
Recent topics
Flagged topics
Hot topics
Best topics
Search...
Search within Swing / AWT / SWT
Search Coderanch
Advance search
Google search
Register / Login
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
Pie Elite
all forums
this forum made possible by our volunteer staff, including ...
Marshals:
Campbell Ritchie
Jeanne Boyarsky
Ron McLeod
Paul Clapham
Liutauras Vilda
Sheriffs:
paul wheaton
Rob Spoor
Devaka Cooray
Saloon Keepers:
Stephan van Hulst
Tim Holloway
Carey Brown
Frits Walraven
Tim Moores
Bartenders:
Mikalai Zaikin
Forum:
Swing / AWT / SWT
How to set focus on JTable
Narayanan Jayaraman
Ranch Hand
Posts: 52
posted 20 years ago
Number of slices to send:
Optional 'thank-you' note:
Send
After populating and displaying JTable how to set focus or highlight the first row in the table. ?Thanks
Di Shoe
Greenhorn
Posts: 7
posted 20 years ago
Number of slices to send:
Optional 'thank-you' note:
Send
What you can do is put the table in a ScrollPane, then call:
scrollPane.getVerticalScrollBar().setValue(x); scrollPane.validate();
where the x in setValue(x) is the row # in the table.
I hope this helps.
Abhik Sarkar
Ranch Hand
Posts: 61
posted 20 years ago
Number of slices to send:
Optional 'thank-you' note:
Send
How about...
table.setRowSelectionInterval(0,0)
Hope this helps,
Abhik.
Narayanan Jayaraman
Ranch Hand
Posts: 52
posted 20 years ago
Number of slices to send:
Optional 'thank-you' note:
Send
Thanks Abhik. It works fine.
Don't get me started about those stupid
light bulbs
.
reply
reply
Bookmark Topic
Watch Topic
New Topic
Boost this thread!
Similar Threads
JTable column non-focusable?
tabbing in JTable
tabbing in JTable
JTable
JTable
More...