Example usage for javax.swing.plaf.metal MetalIconFactory getFileChooserDetailViewIcon

List of usage examples for javax.swing.plaf.metal MetalIconFactory getFileChooserDetailViewIcon

Introduction

In this page you can find the example usage for javax.swing.plaf.metal MetalIconFactory getFileChooserDetailViewIcon.

Prototype

public static Icon getFileChooserDetailViewIcon() 

Source Link

Document

Returns the instance of FileChooserDetailViewIcon .

Usage

From source file:MainClass.java

public static void main(String args[]) {
    JFrame f = new JFrame("JToolBar Sample");
    f.setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE);
    JToolBar toolbar = new JToolBar();
    Icon icon = MetalIconFactory.getFileChooserDetailViewIcon();
    JToggleButton button = new JToggleButton(icon);
    toolbar.add(button);/*from   w  w w  .j av  a2s. c om*/
    icon = MetalIconFactory.getFileChooserHomeFolderIcon();
    button = new JToggleButton(icon);
    toolbar.add(button);
    icon = MetalIconFactory.getFileChooserListViewIcon();
    button = new JToggleButton(icon);
    toolbar.add(button);
    f.add(toolbar, BorderLayout.NORTH);
    f.setSize(300, 100);
    f.setVisible(true);
}

From source file:Main.java

public static void main(String args[]) {
    JFrame f = new JFrame("JToolbar Sample");
    f.setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE);
    Container content = f.getContentPane();
    JToolBar toolbar = new JToolBar();
    Icon icon = MetalIconFactory.getFileChooserDetailViewIcon();
    JToggleButton button = new JToggleButton(icon);
    toolbar.add(button);/*w  ww .  j a  va 2s .c o  m*/
    icon = MetalIconFactory.getFileChooserHomeFolderIcon();
    button = new JToggleButton(icon);
    toolbar.add(button);
    icon = MetalIconFactory.getFileChooserListViewIcon();
    button = new JToggleButton(icon);
    toolbar.add(button);
    content.add(toolbar, BorderLayout.NORTH);
    f.setSize(300, 100);
    f.setVisible(true);
}