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
Tim Cooke
Ron McLeod
paul wheaton
Jeanne Boyarsky
Sheriffs:
Paul Clapham
Devaka Cooray
Saloon Keepers:
Tim Holloway
Roland Mueller
Himai Minh
Bartenders:
Forum:
Swing / AWT / SWT
How to set focus on JTable
Narayanan Jayaraman
Ranch Hand
Posts: 52
posted 21 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 21 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 21 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 21 years ago
Number of slices to send:
Optional 'thank-you' note:
Send
Thanks Abhik. It works fine.
With a little knowledge, a
cast iron skillet
is non-stick and lasts a lifetime.
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...