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

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

Introduction

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

Prototype

public static Icon getFileChooserListViewIcon() 

Source Link

Document

Returns the instance of FileChooserListViewIcon .

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 a v  a 2  s .  c o  m*/
    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 .ja v a  2 s .  com*/
    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);
}