/*
 * To change this license header, choose License Headers in Project Properties.
 * To change this template file, choose Tools | Templates
 * and open the template in the editor.
 */

import java.awt.BorderLayout;
import java.awt.HeadlessException;
import java.util.logging.Level;
import java.util.logging.Logger;
import javax.swing.JFrame;
import javax.swing.JList;
import javax.swing.JTree;
import javax.swing.UIManager;
import javax.swing.UnsupportedLookAndFeelException;

/**
 *
 * @author ampopov
 */
public class JListMotifLafCtrlATest extends JFrame {

    public JListMotifLafCtrlATest() throws HeadlessException {
        setTitle("JListMotifLafCtrlATest");
        JList list = new JList(new Object[]{"one", "two", "three", "four",
            UIManager.getLookAndFeel().getName()});
        add(list);
        JTree tree = new JTree();
        
        tree.setEditable(true);
        add(tree, BorderLayout.NORTH);
    }

    /**
     * @param args the command line arguments
     */
    public static void main(String[] args) {
        try {
            UIManager.setLookAndFeel(
                    "com.sun.java.swing.plaf.motif.MotifLookAndFeel");
        } catch (ClassNotFoundException ex) {
            Logger.getLogger(JListMotifLafCtrlATest.class.getName())
                    .log(Level.SEVERE, null, ex);
        } catch (InstantiationException ex) {
            Logger.getLogger(JListMotifLafCtrlATest.class.getName())
                    .log(Level.SEVERE, null, ex);
        } catch (IllegalAccessException ex) {
            Logger.getLogger(JListMotifLafCtrlATest.class.getName())
                    .log(Level.SEVERE, null, ex);
        } catch (UnsupportedLookAndFeelException ex) {
            Logger.getLogger(JListMotifLafCtrlATest.class.getName())
                    .log(Level.SEVERE, null, ex);
        }
        JFrame f = new JListMotifLafCtrlATest();
        f.setDefaultCloseOperation(EXIT_ON_CLOSE);
        f.pack();
        f.setVisible(true);

    }

}
