{
public static void main( String[] args )
{
FocusTest test = new FocusTest();
test.pack();
test.setVisible(true);
}
{
super("Focus Test");
setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE);
{
JPanel panel = new JPanel();
panel.setBorder( BorderFactory.createEmptyBorder(12,12,12,12));
panel.setLayout( new BoxLayout(panel, BoxLayout.Y_AXIS));
JButton button = new JButton("Test button");
panel.add(button);
panel.add( textArea1 );
panel.add( textArea2 );
}
{
public MyTextArea()
{
super(10, 50);
Set forwardFocusTraversalKeys = new HashSet();
forwardFocusTraversalKeys.add(AWTKeyStroke.getAWTKeyStroke(KeyEvent.VK_TAB, 0, true));
setFocusTraversalKeys(KeyboardFocusManager.FORWARD_TRAVERSAL_KEYS, forwardFocusTraversalKeys);
backwardFocusTraversalKeys.add(AWTKeyStroke.getAWTKeyStroke(KeyEvent.VK_TAB, InputEvent.SHIFT_DOWN_MASK, true));
setFocusTraversalKeys(KeyboardFocusManager.BACKWARD_TRAVERSAL_KEYS, backwardFocusTraversalKeys);
}
}
Ing. Wim
Deblauwe
Software
Development Engineer
BarcoView
- Medical Imaging Systems
Theodoor
Sevenslaan 106
B-8500
Kortrijk, Belgium
Tel.
+32 56 233 985 Fax +32 56 233 457
www.barco.com
[EMAIL PROTECTED]
- - - - - - - - DISCLAIMER - - - - - - - -
Unless indicated otherwise, the information contained in this message is privileged and confidential, and is intended only for the use of the addressee(s) named above and others who have been specifically authorized to receive it. If you are not the intended recipient, you are hereby notified that any dissemination, distribution or copying of this message and/or attachments is strictly prohibited. The company accepts no liability for any damage caused by any virus transmitted by this email. Furthermore, the company does not warrant a proper and complete transmission of this information, nor does it accept liability for any delays. If you have received this message in error, please contact the sender and delete the message. Thank you.
