Search Results for 'JTextArea'


1 POSTS

  1. 2007.12.18 JTextArea의 tab/shift+tab을 이용한 component간 focus traversal
JTextArea textarea = new JTextArea();
TreeSet<KeyStroke> FORWARD_TRAVERSAL = new TreeSet<KeyStroke>();
TreeSet<KeyStroke> BACKWARD_TRAVERSAL = new TreeSet<KeyStroke>();
FORWARD_TRAVERSAL.add(KeyStroke.getKeyStroke(KeyEvent.VK_TAB, 0));
BACKWARD_TRAVERSAL.add(KeyStroke.getKeyStroke(KeyEvent.VK_TAB, InputEvent.SHIFT_MASK));
textarea.setFocusTraversalKeys(KeyboardFocusManager.FORWARD_TRAVERSAL_KEYS, FORWARD_TRAVERSAL);
textarea.setFocusTraversalKeys(KeyboardFocusManager.BACKWARD_TRAVERSAL_KEYS, BACKWARD_TRAVERSAL);
신고

Tag : , ,

티스토리 툴바