protected final void initUI()
	{
        // initialize window manager:
        wm = new WindowManager();

        // initialize a layout manager:
        setLayout(new BoxLayout(getContentPane(), BoxLayout.Y_AXIS));

        // set up FileChooser for this class:
        fc = new JFileChooser();
        fc_filter = new ExtensionFileFilter(FILE_FILTER_NAME, FILE_FILTER_EXTS);
        fc.setFileFilter(fc_filter);

        // create a menu bar:
		menubar = new JMenuBar();

        // ---------------------------------------------------------
        //                 First dropdown menu: "File"
        // ---------------------------------------------------------
		JMenu file = new JMenu("File");
		file.setMnemonic(KeyEvent.VK_F);

        // Set up a open dialog option under the file menu:
        JMenuItem menu_file_open;
        // try to open and use an icon:
        try
        {
            ImageIcon menu_file_open_icon = new ImageIcon(getClass().getResource("/SciTK/resources/document-open-2.png"));
            menu_file_open = new JMenuItem("Open", menu_file_open_icon);
        }
        catch( Exception e ) // could not load icon
        {
            menu_file_open = new JMenuItem("Open");
        }
        menu_file_open.setMnemonic(KeyEvent.VK_O);
        menu_file_open.setAccelerator(KeyStroke.getKeyStroke(KeyEvent.VK_O,Toolkit.getDefaultToolkit().getMenuShortcutKeyMask()));
        menu_file_open.setToolTipText("Open a file");
        menu_file_open.addActionListener(new ActionListener() {
            public void actionPerformed(ActionEvent event) {
                // Select a file using the JFileChooser dialog:
                int fc_return = fc.showOpenDialog(SciTK_App.this);
                if( fc_return == JFileChooser.APPROVE_OPTION )
                {
                    app_file = fc.getSelectedFile();
                    // call a function, implemented by the user, to
                    // do something with the file:
                    openFile();
                }
            }
        });
        file.add(menu_file_open);

        // Set up an exit option under the file menu:
        JMenuItem menu_file_exit;
        try
        {
            ImageIcon menu_file_exit_icon = new ImageIcon(getClass().getResource("/SciTK/resources/application-exit.png"));
            menu_file_exit = new JMenuItem("Exit", menu_file_exit_icon);
        }
        catch(Exception e) // could not load icon
        {
            menu_file_exit = new JMenuItem("Exit");
        }
        menu_file_exit.setMnemonic(KeyEvent.VK_X);
        menu_file_exit.setAccelerator(KeyStroke.getKeyStroke(KeyEvent.VK_X,Toolkit.getDefaultToolkit().getMenuShortcutKeyMask()));
        menu_file_exit.setToolTipText("Exit application");
        menu_file_exit.addActionListener(new ActionListener() {
            public void actionPerformed(ActionEvent event) {
                System.exit(0);
            }

        });
        file.add(menu_file_exit);

        // ---------------------------------------------------------
        //                 Second dropdown menu: "Help"
        // ---------------------------------------------------------
        JMenu help = new JMenu("Help");
        help.setMnemonic(KeyEvent.VK_H);

        JMenuItem about = new JMenuItem("About");
        help.add(about);

        about.addActionListener(new ActionListener() {

            public void actionPerformed(ActionEvent event) {
                String[] info = new String[3];
                if( about_icon!=null && NAME!=null && DATE!=null && AUTHOR!=null)
                {
                    info[0] =  NAME ;
                    info[1] = DATE ;
                    info[2] = AUTHOR ;
                    DialogAbout ad = new DialogAbout(about_icon,info);
                }
                else
                {
                    DialogAbout ad = new DialogAbout();
                }
            }
        });

        // Add File and Help to the menu:
        menubar.add(file);
        menubar.add(help);
        // Set menubar as this JFrame's menu
        setJMenuBar(menubar);


        // ---------------------------------------------------------
        //                 Misc
        // ---------------------------------------------------------

        // Some global setup for the JFrame:
		setTitle(NAME);
		setSize(default_width,default_height);
        wm.add(this);
		setDefaultCloseOperation(EXIT_ON_CLOSE);

        // set the icon to use for tray/dock functionality:
        if( tray_icon != null )
            this.setIconImage(tray_icon.getImage());
	}