Example usage for javax.swing JTextArea getTabSize

List of usage examples for javax.swing JTextArea getTabSize

Introduction

In this page you can find the example usage for javax.swing JTextArea getTabSize.

Prototype

public int getTabSize() 

Source Link

Document

Gets the number of characters used to expand tabs.

Usage

From source file:Main.java

public static void main(String[] argv) {
    JTextArea textarea = new JTextArea();
    // Get the default tab size
    int tabSize = textarea.getTabSize(); // 8

    // Change the tab size
    tabSize = 4;/*  w  w w  .  j a va 2 s . c o m*/
    textarea.setTabSize(tabSize);

    Font font = textarea.getFont();
    System.out.println(font);
}