Velocity Reviews - Computer Hardware Reviews

Velocity Reviews > Newsgroups > Programming > Java > !Ahhh JTable JComboBox woes

Reply
Thread Tools

!Ahhh JTable JComboBox woes

 
 
timasmith@hotmail.com
Guest
Posts: n/a
 
      08-09-2006

So I have a CombBox sitting in my table but every time I press any
letter it bumps me out to the next control on the form.

I stopped that by extending DefaultCellEditor and returning false on
stopCellEditing

@Override
public boolean stopCellEditing() {
return false;
}

So the question remains on the best way to

a) Capture that enter or selection occurred in the combo box editor
b) stopCellEditing AND put the focus on the next cell not control.

thanks

 
Reply With Quote
 
 
 
 
Thomas Fritsch
Guest
Posts: n/a
 
      08-09-2006
http://www.velocityreviews.com/forums/(E-Mail Removed) wrote:
> So I have a CombBox sitting in my table but every time I press any
> letter it bumps me out to the next control on the form.

It seems you have some weird focus handling implemented in your form.
But I can't say more without seeing your code.
>
> I stopped that by extending DefaultCellEditor and returning false on
> stopCellEditing
>
> @Override
> public boolean stopCellEditing() {

No good idea! You should at least call
super.stopCellEditing();
here. Otherwise the cell editor doesn't write the selected ComboBox
value back into the JTable's data.
> return false;
> }
>
> So the question remains on the best way to
>
> a) Capture that enter or selection occurred in the combo box editor
> b) stopCellEditing AND put the focus on the next cell not control.




--
Thomas
 
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
JTable in JComboBox lizard Java 7 07-27-2012 08:58 AM
JComboBox not visible in JTable sonaljain Java 0 03-18-2011 04:43 AM
Putting a JTable inside a JTable cell? Tivo Escobar Java 1 04-12-2007 11:09 AM
Controlling JComboBox size in JTable cell Yulia Java 1 07-04-2005 10:29 AM
JTable Cell Editor - JComboBox column Chris Java 0 06-14-2005 09:09 PM



Advertisments