package cat;
/**
* @author Roger Olivella (ICM-CSIC)
* @version 1.0
*
* Development Environment : Eclipse
*
* Name of the Application : MainInsula.java
* Creation/Modification History :
*
* Roger O. 11/04/2006 Created
*/
import javax.swing.*;
import java.awt.event.*;
/**
* Classe amb el metode main() indispensable per fer funcionar l'applet standalone.
* Instruccions de creacio del JAR executable:
*
* 1. S'ha de crear un manifest on s'indiqui la posicio d'aquesta classe MainInsula (cat.MainInsula).
* 2. Executar ANT
*/
public class MainInsula {
public static void main(String[] args) {
// Create an instance of the applet class.
JApplet applet = new Interfase2();
// Send the applet an init() message.
applet.init();
// Construct a JFrame.
final JFrame frame = new JFrame("INSULA");
// Transfer the applet's context pane to the JFrame.
frame.setContentPane(applet.getContentPane());
// Transfer the applet's menu bar into the JFrame.
// This line can be omitted if the applet
// does not create a menu bar.
frame.setJMenuBar(applet.getJMenuBar());
// Add a window listener to the frame for shutting
// down the application.
frame.addWindowListener(new WindowAdapter() {
public void windowClosing(WindowEvent e) {
frame.dispose();
System.exit(0);
}
});
// Set the size of the frame.
// To pack the frame as tightly as possible
// replace the setSize() message with the following.
// frame.pack();
frame.setSize(1000, 700);
// Set the location of the frame.
frame.setLocation(5, 5);
// Show the frame.
//frame.show();
frame.setVisible(true);
}
}