Here you can find the source of fixTabKeys(JTextArea textArea)
public static JTextArea fixTabKeys(JTextArea textArea)
//package com.java2s; /*/*from ww w.j a v a 2s.c o m*/ (C) 2007 Stefan Reich (jazz@drjava.de) This source file is part of Project Prophecy. For up-to-date information, see http://www.drjava.de/prophecy This source file is free software; you can redistribute it and/or modify it under the terms of the GNU Lesser General Public License as published by the Free Software Foundation, version 2.1. */ import javax.swing.*; public class Main { public static JTextArea fixTabKeys(JTextArea textArea) { /* Action nextFocusAction = new AbstractAction("Move Focus Forwards") { public void actionPerformed(ActionEvent evt) { ((Component)evt.getSource()).transferFocus(); } }; Action prevFocusAction = new AbstractAction("Move Focus Backwards") { public void actionPerformed(ActionEvent evt) { ((Component)evt.getSource()).transferFocusBackward(); } }; textArea.getActionMap().put(nextFocusAction.getValue(Action.NAME), nextFocusAction); textArea.getActionMap().put(prevFocusAction.getValue(Action.NAME), prevFocusAction); */ /*textArea.addKeyListener(new KeyListener() { public void keyTyped(KeyEvent e) { if (e.getKeyCode() == e.VK_TAB) { System.out.println("Tab pressed"); } } public void keyPressed(KeyEvent e) { //To change body of implemented methods use File | Settings | File Templates. } public void keyReleased(KeyEvent e) { //To change body of implemented methods use File | Settings | File Templates. } });*/ //TODO return textArea; } }