jcombobox

i want every time i press enter then jcombobox stop editing and go to next component focus, like i press tab button. thank's
[132 byte] By [suryanto_soa] at [2007-11-27 5:49:03]
# 1
in the action listener, get the focus manager and tell it to move on.
bsampieria at 2007-7-12 15:35:05 > top of Java-index,Desktop,Core GUI APIs...
# 2

Add an ActionListener to it and call transferFocus().

JComboBox jcb = new JComboBox();

jcb.addActionListener(new ActionListener() {

public void actionPerformed(ActionEvent e) {

transferFocus();

}

});

rebola at 2007-7-12 15:35:05 > top of Java-index,Desktop,Core GUI APIs...
# 3
i had increase to ten dukes so please. give me a little sample to show leave a editing comboxbox to next component by press enter.Message was edited by: suryanto_so
suryanto_soa at 2007-7-12 15:35:05 > top of Java-index,Desktop,Core GUI APIs...
# 4
Check this URL http://www.developer.com/java/other/article.php/2244591Dont forget to assign a duke if you are satisfied :)
AnanSmritia at 2007-7-12 15:35:05 > top of Java-index,Desktop,Core GUI APIs...
# 5
What should be different in my example above? In what manner does it fail?
rebola at 2007-7-12 15:35:05 > top of Java-index,Desktop,Core GUI APIs...
# 6
it doesn't listen to keyboard activity like enter pressed,your's link didn't give anything, may you make a very simple code to show how jcombo move from editing to next component when i press enterMessage was edited by: suryanto_so
suryanto_soa at 2007-7-12 15:35:05 > top of Java-index,Desktop,Core GUI APIs...
# 7

thank's rebol i had tried to my program it work, i don't why i thought it should listen to key listener, however i wrong you right.

anyway thank's this dukes belong to you.

could you help me on this thread :

http://forum.java.sun.com/thread.jspa?messageID=9693905

Message was edited by:

suryanto_so

suryanto_soa at 2007-7-12 15:35:05 > top of Java-index,Desktop,Core GUI APIs...