Main.java Source code

Java tutorial

Introduction

Here is the source code for Main.java

Source

import javax.swing.text.AttributeSet;
import javax.swing.text.StyleConstants;

public class Main {
    public static void main(String[] argv) {
        // Check if character-based attribute
        boolean b = StyleConstants.Italic instanceof AttributeSet.CharacterAttribute;
        b = StyleConstants.LineSpacing instanceof AttributeSet.CharacterAttribute;

        // Check if paragraph-based attribute
        b = StyleConstants.LineSpacing instanceof AttributeSet.ParagraphAttribute;
        b = StyleConstants.Italic instanceof AttributeSet.ParagraphAttribute;
    }
}