Example #1
0
 public void jButtonStop_actionPerformed(ActionEvent e) {
   jButtonStart.setEnabled(true);
   server.interrupt();
   connections(0);
   statusBar.setText("Server stopped!");
   jButtonStop.setEnabled(false);
   jButtonConfig.setEnabled(false);
 }
Example #2
0
 public void jButtonText_actionPerformed(ActionEvent e) {
   DialogText text = new DialogText();
   text.setSize(500, 300);
   // Center the window
   Dimension screenSize = Toolkit.getDefaultToolkit().getScreenSize();
   Dimension frameSize = text.getSize();
   if (frameSize.height > screenSize.height) {
     frameSize.height = screenSize.height;
   }
   if (frameSize.width > screenSize.width) {
     frameSize.width = screenSize.width;
   }
   text.setLocation(
       (screenSize.width - frameSize.width) / 2, (screenSize.height - frameSize.height) / 2);
   text.setModal(true);
   text.show();
   server.updateGUI();
 }
Example #3
0
 public void jButtonStart_actionPerformed(ActionEvent e) {
   GregorianCalendar now = new GregorianCalendar();
   if (now.before(new GregorianCalendar(2005, 12, 31))) {
     jButtonStop.setEnabled(true);
     server = new Server(this);
     server.start();
     //        System.out.println(System.getProperty("sun.boot.class.path"));
     statusBar.setText("Server is running...");
     jButtonStart.setEnabled(false);
     jButtonConfig.setEnabled(false);
   } else {
     JOptionPane.showMessageDialog(
         this,
         "Evaluation License has expired or is obsolete;\nplease contact vendor for renewal.",
         "License Error",
         JOptionPane.ERROR_MESSAGE);
   }
 }