List of usage examples for javax.swing.plaf.metal MetalIconFactory getFileChooserDetailViewIcon
public static Icon getFileChooserDetailViewIcon()
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); }