// @topic T11655 Swing demo A5 -- Sublassing main application frame
// @brief class SwingMain
/**
 * @author ik
 */

package pckg;

import javax.swing.*;
import javax.swing.event.*;
import javax.swing.border.*;
import javax.swing.text.*;

public class SwingMain
{
    public static void main(String[] args) {
        SwingUtilities.invokeLater(new Runnable() {
            public void run() {
                createAndShowGUI();
            }
        });
    }//main

    public static void createAndShowGUI() {
        // Swing test
        setSystemLookFeel();
        ApplicationFrame frame = new ApplicationFrame("AppplicationFrame is me");
    } //createAndShowGUI

    // Setting OS-specific look and feel:
    private static void setSystemLookFeel()
    {
        // Force to come up in the system look and feel
        String laf = UIManager.getSystemLookAndFeelClassName();
        try
        {
            UIManager.setLookAndFeel(laf);
        }
        catch (UnsupportedLookAndFeelException exc)
        {
            System.err.println("Unsupported: " + laf);
        }
        catch (Exception exc)
        {
            System.err.println("Error loading " + laf);
        }
    }
} //SwingMain