Questo sito utilizza cookies solo per scopi di autenticazione sul sito e nient'altro. Nessuna informazione personale viene tracciata. Leggi l'informativa sui cookies.
Username: Password: oppure
JaVi - Java Vigenere - AppSara.java

AppSara.java

Caricato da: Teutoburgo
Scarica il programma completo

  1. /*
  2.        JaVi v0.8 - JavaVigenere -   A Java implementation of the Vigenere
  3.                                     cryptographical algorithm
  4.                                     Un'implementazione Java dell'algoritmo di
  5.                                     Vigenere per la crittografia
  6.     Copyright (C) 2002 Pierre Blanc
  7.     Pierre Blanc: pierre@trek.eu.org , blanc_teutoburgo@yahoo.it
  8.     http://it.geocities.com/teutoburgo                (italiano)
  9.     http://it.geocities.com/teutoburgo/indexEn.html   (english)
  10.  
  11.     This program is free software; you can redistribute it and/or modify
  12.     it under the terms of the GNU General Public License as published by
  13.     the Free Software Foundation; either version 2 of the License.
  14.  
  15.     This program is distributed in the hope that it will be useful,
  16.     but WITHOUT ANY WARRANTY; without even the implied warranty of
  17.     MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
  18.     GNU General Public License for more details.
  19.  
  20.     You should have received a copy of the GNU General Public License
  21.     along with this program; if not, write to the Free Software
  22.     Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA
  23.     or go to      http://www.gnu.org/copyleft/gpl.html
  24.  
  25.  
  26.     Questo  programma è  software  libero; è  lecito redistribuirlo  o
  27.     modificarlo secondo i termini  della Licenza Pubblica Generica GNU
  28.     come è pubblicata dalla Free  Software Foundation, o la versione 2
  29.     della licenza.
  30.     Questo programma  è distribuito nella  speranza che sia  utile, ma
  31.     SENZA  ALCUNA GARANZIA;  senza  neppure la  garanzia implicita  di
  32.     NEGOZIABILITÀ  o di  APPLICABILITÀ PER  UN PARTICOLARE  SCOPO.  Si
  33.     veda la Licenza Pubblica Generica GNU per avere maggiori dettagli.
  34.  
  35.     Questo  programma deve  essere  distribuito assieme  ad una  copia
  36.     della Licenza Pubblica Generica GNU;  in caso contrario, se ne può
  37.     ottenere  una scrivendo  alla Free  Software Foundation,  Inc., 59
  38.     Temple Place, Suite 330, Boston, MA 02111-1307 USA  oppure da
  39.     http://www.gnu.org/copyleft/gpl.html
  40.  
  41. */
  42. import javax.swing.UIManager;
  43. import java.awt.*;
  44.  
  45. public class AppSara {
  46.   boolean packFrame = false;
  47.  
  48.   //Construct the application
  49.   public AppSara() {
  50.     Frame1 frame = new Frame1();
  51.     //Validate frames that have preset sizes
  52.     //Pack frames that have useful preferred size info, e.g. from their layout
  53.     if (packFrame) {
  54.       frame.pack();
  55.     }
  56.     else {
  57.       frame.validate();
  58.     }
  59.     //Center the window
  60.     Dimension screenSize = Toolkit.getDefaultToolkit().getScreenSize();
  61.     Dimension frameSize = frame.getSize();
  62.     if (frameSize.height > screenSize.height) {
  63.       frameSize.height = screenSize.height;
  64.     }
  65.     if (frameSize.width > screenSize.width) {
  66.       frameSize.width = screenSize.width;
  67.     }
  68.     frame.setLocation((screenSize.width - frameSize.width) / 2, (screenSize.height - frameSize.height) / 2);
  69.     frame.setVisible(true);
  70.   }
  71.   //Main method
  72.   public static void main(String[] args) {
  73.     try {
  74.       UIManager.setLookAndFeel(UIManager.getSystemLookAndFeelClassName());
  75.     }
  76.     catch(Exception e) {
  77.       e.printStackTrace();
  78.     }
  79.     new AppSara();
  80.   }
  81. }