Velocity Reviews - Computer Hardware Reviews

Velocity Reviews > Newsgroups > Programming > Java > Swithcing between 2 JTables.

Reply
Thread Tools

Swithcing between 2 JTables.

 
 
kjartana@gmail.com
Guest
Posts: n/a
 
      03-07-2006
Hello.

I'm writing a swing application that has 2 JTables on seperate
JScrollPane. When data in table 1 is edited I submit it to a database
(using a TableModelListener) and would then like the focus to be set to
table 2.

My problem is setting the focus from table 1 to table 2.

Any help would be much appreciated.

 
Reply With Quote
 
 
 
 
VisionSet
Guest
Posts: n/a
 
      03-07-2006

<(E-Mail Removed)> wrote in message
news:(E-Mail Removed) ups.com...
> Hello.
>
> I'm writing a swing application that has 2 JTables on seperate
> JScrollPane. When data in table 1 is edited I submit it to a database
> (using a TableModelListener) and would then like the focus to be set to
> table 2.
>
> My problem is setting the focus from table 1 to table 2.
>
> Any help would be much appreciated.


Not used it myself, but have you tried java.awt.FocusTraversalPolicy?
You should be able to do it so you don't need a reference to the other
table.

<http://java.sun.com/docs/books/tutorial/uiswing/misc/focus.html>

--
Mike W


 
Reply With Quote
 
 
 
Reply

Thread Tools

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
difference between between these "char"s arnuld C++ 33 03-05-2007 03:11 PM
Subnets between core and access/distribution layers & routing between layers J Cisco 0 12-13-2006 08:38 PM
share function argument between subsequent calls but not between class instances! K. Jansma Python 7 02-21-2006 01:31 PM
Difference between bin and obj directories and difference between project references and dll references jakk ASP .Net 4 03-22-2005 09:23 PM
Exact difference between 'const char *' and 'char *', also diff between 'const' and 'static' Santa C Programming 1 07-17-2003 02:10 PM



Advertisments