Example usage for javax.swing JTree setDoubleBuffered

List of usage examples for javax.swing JTree setDoubleBuffered

Introduction

In this page you can find the example usage for javax.swing JTree setDoubleBuffered.

Prototype

public void setDoubleBuffered(boolean aFlag) 

Source Link

Document

Sets whether this component should use a buffer to paint.

Usage

From source file:EmbedSwingAWTSWT.java

public static void main(String[] args) {
    final Display display = new Display();
    final Shell shell = new Shell(display);
    shell.setText("SWT and Swing/AWT Example");

    Composite treeComp = new Composite(shell, SWT.EMBEDDED);

    treeComp.setBounds(5, 5, 300, 300);//from  w  w w .  ja v  a  2  s .  c o m

    java.awt.Frame fileTableFrame = SWT_AWT.new_Frame(treeComp);
    java.awt.Panel panel = new java.awt.Panel(new java.awt.BorderLayout());
    fileTableFrame.add(panel);
    JTree fileTable = new JTree();
    fileTable.setDoubleBuffered(true);
    JScrollPane scrollPane = new JScrollPane(fileTable);
    panel.add(scrollPane);

    shell.open();
    while (!shell.isDisposed()) {
        if (!display.readAndDispatch())
            display.sleep();
    }
    display.dispose();
}