Introduction
// Create a text area
JTextArea textarea = new JTextArea();
// Get the default tab size
int tabSize = textarea.getTabSize(); // 8
// Change the tab size
tabSize = 4;
textarea.setTabSize(tabSize);
Font font = textarea.getFont();