Example usage for javax.swing DebugGraphics FLASH_OPTION

List of usage examples for javax.swing DebugGraphics FLASH_OPTION

Introduction

In this page you can find the example usage for javax.swing DebugGraphics FLASH_OPTION.

Prototype

int FLASH_OPTION

To view the source code for javax.swing DebugGraphics FLASH_OPTION.

Click Source Link

Document

Flash graphics operations.

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(/*ww  w .  jav a  2  s. c  o  m*/
            DebugGraphics.BUFFERED_OPTION | DebugGraphics.FLASH_OPTION | DebugGraphics.LOG_OPTION);

    frame.add(bn);

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

    frame.add(bn);
}