Class Menu

Constructors:

  Menu()
     Constructs a new menu with an empty label.
  Menu(String)
     Constructs a new menu with the specified label.
  Menu(String, boolean)
     Constructs a new menu with the specified label.

 
Methods:

  add(MenuItem)
     Adds the specified menu item to this menu.
  add(String)
     Adds an item with the specified label to this menu.
  addSeparator()
     Adds a separator line, or a hypen, to the menu at the current position.
  getItem(int)
     Gets the item located at the specified index of this menu.
  getItemCount()
     Get the number of items in this menu.
  insert(MenuItem, int)
     Inserts a menu item into this menu at the specified position.
  insert(String, int)
     Inserts a menu item with the specified label into this menu at the specified position.
  insertSeparator(int)
     Inserts a separator at the specified position.
  remove(int)
     Removes the menu item at the specified index from this menu.
  remove(MenuComponent)
     Removes the specified menu item from this menu.
  removeAll()
     Removes all items from this menu.
 

   Class Dialog

Constructors:

  Dialog(Frame)
     Constructs an initially invisible Dialog with an empty title.
  Dialog(Frame, boolean)
     Constructs an initially invisible Dialog with an empty title.
  Dialog(Frame, String)
     Constructs an initially invisible Dialog with a title.
  Dialog(Frame, String, boolean)
     Constructs an initially invisible Dialog with a title.

 
Methods:

  getTitle()
     Gets the title of the dialog.
  isModal()
     Indicates whether the dialog is modal.
  isResizable()
     Indicates whether this dialog window is resizable.
  setModal(boolean)
     Specifies whether this dialog is modal.
  setResizable(boolean)
     Sets the resizable flag.
  setTitle(String)
     Sets the title of the Dialog.
  show()
     Shows the dialog.
 
 

import java.io.*;
import java.net.*;
import java.util.*;
import java.awt.*;
import java.lang.*;
import java.applet.Applet;
import java.awt.event.*;

class DDialog extends Dialog implements ActionListener{
     Label serverdown;  //label that displays message
     Button ok;   // button that closes window
 
 DDialog(Frame f, boolean modal,String message){
     super(f,modal);

      serverdown = new Label(message);
      ok = new Button("OK");
      ok.addActionListener(this);
      .
      .
      .

      addComponent(serverdown,gbl,c,0,0,1,1,100,100);
      addComponent(ok,gbl,c,0,1,1,1,0,0);

      setBackground(Color.lightGray);
      reshape(200,100,300,100);
      show();
     }
 
 
 /*Closes Window*/
 public void actionPerformed(ActionEvent e){
  if(e.getActionCommand().equals("OK")){
   dispose();
  }
 }
}
 

import java.io.*;
import java.lang.*;
import java.net.*;
import java.util.*;
import java.awt.*;
import java.awt.event.*;
import COM.taligent.widget.*;

public final class TurnIn implements ActionListener,ItemListener,WindowClose,Runnable,FtpListener {
     .
     .
     .
     .
public void actionPerformed(ActionEvent e){
     if (e.getActionCommand().equals("1. Select File(s) To Turn In")){
          .
          .
          .
     }
     else if (e.getActionCommand().equals("About..")){
            DDialog w = new DDialog(f,true,"TurnIn  -  by Daniel Glover");
     }
     else if (e.getActionCommand().equals("Help..")){
            DHelp w= new DHelp("Help");
     }
      .
      .
      .
      .
}
 .
 .
 .
 .
 .
TurnIn(int port,String newhost){
       .
      .
      .
      f = new Frame();
      MenuBar mb = new MenuBar();
      f.setMenuBar(mb);
      Menu help = new Menu("Help");
      help.add("About..");
      help.add("Help..");
      mb.setHelpMenu(help);
      help.addActionListener(this);
      .
      .
      .
      .
}
 

}