Example usage for weka.gui ComponentHelper getImage

List of usage examples for weka.gui ComponentHelper getImage

Introduction

In this page you can find the example usage for weka.gui ComponentHelper getImage.

Prototype

public static Image getImage(String filename) 

Source Link

Document

returns the Image for a given filename, NULL if not successful

Usage

From source file:meka.gui.dataviewer.DataViewer.java

License:Open Source License

/**
 * creates all the components in the frame
 *//* www.  j  av  a2  s . c  o m*/
protected void createFrame() {
    // basic setup
    setIconImage(ComponentHelper.getImage("weka_icon.gif"));
    setSize(DataViewerMainPanel.WIDTH, DataViewerMainPanel.HEIGHT);
    setCenteredLocation();
    setDefaultCloseOperation(DISPOSE_ON_CLOSE);
    // remove the listener - otherwise we get the strange behavior that one
    // frame receives a window-event for every single open frame!
    removeWindowListener(this);
    // add listener anew
    addWindowListener(this);

    getContentPane().setLayout(new BorderLayout());

    m_MainPanel = new DataViewerMainPanel(this);
    m_MainPanel.setConfirmExit(false);
    getContentPane().add(m_MainPanel, BorderLayout.CENTER);

    setJMenuBar(m_MainPanel.getMenu());
}