Example usage for javax.swing JButton setDebugGraphicsOptions

List of usage examples for javax.swing JButton setDebugGraphicsOptions

Introduction

In this page you can find the example usage for javax.swing JButton setDebugGraphicsOptions.

Prototype

@BeanProperty(bound = false, preferred = true, enumerationValues = { "DebugGraphics.NONE_OPTION",
        "DebugGraphics.LOG_OPTION", "DebugGraphics.FLASH_OPTION",
        "DebugGraphics.BUFFERED_OPTION" }, description = "Diagnostic options for graphics operations.")
public void setDebugGraphicsOptions(int debugOptions) 

Source Link

Document

Enables or disables diagnostic information about every graphics operation performed within the component or one of its children.

Usage

From source file:DebugGraphicsDemo.java

public static void main(String[] a) {

    JFrame frame = new JFrame();
    frame.setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE);

    JButton bn = new JButton();

    RepaintManager repaintManager = RepaintManager.currentManager(bn);
    repaintManager.setDoubleBufferingEnabled(false);

    bn.setDebugGraphicsOptions(
            DebugGraphics.BUFFERED_OPTION | DebugGraphics.FLASH_OPTION | DebugGraphics.LOG_OPTION);

    frame.add(bn);//from   w w  w  . j  a  v  a2 s  . co m

    frame.setSize(300, 300);
    frame.setVisible(true);

    frame.add(bn);
}