Ta TabSize

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();

Leave a Reply

Your email address will not be published. Required fields are marked *

This site uses Akismet to reduce spam. Learn how your comment data is processed.