home *** CD-ROM | disk | FTP | other *** search
/ ftp.ee.pdx.edu / 2014.02.ftp.ee.pdx.edu.tar / ftp.ee.pdx.edu / oss / cvs-2004 / cantalope / drawUI.java,v < prev    next >
Text File  |  2003-07-14  |  2KB  |  85 lines

  1. head     1.1;
  2. branch   1.1.1;
  3. access   ;
  4. symbols  Initial:1.1.1.1 CANtalope:1.1.1;
  5. locks    ; strict;
  6. comment  @# @;
  7.  
  8.  
  9. 1.1
  10. date     2003.07.14.20.41.53;  author larryl;  state Exp;
  11. branches 1.1.1.1;
  12. next     ;
  13.  
  14. 1.1.1.1
  15. date     2003.07.14.20.41.53;  author larryl;  state Exp;
  16. branches ;
  17. next     ;
  18.  
  19.  
  20. desc
  21. @@
  22.  
  23.  
  24.  
  25. 1.1
  26. log
  27. @Initial revision
  28. @
  29. text
  30. @/**
  31.  *
  32.  *    DrawUI.java
  33.  * 
  34.  * This method draws the UI and handles all 
  35.  * the actions taken by users.
  36.  * 
  37.  *
  38.  */
  39. import javax.swing.*;
  40. import java.awt.*;
  41. import java.awt.event.*;
  42.  
  43. public class drawUI extends JFrame implements ActionListener{
  44.     private JLabel prompt       = new JLabel( "FIlename :" );
  45.     private JTextField input    = new JTextField( 20 );
  46.     private JTextArea display   = new JTextArea( 50,50 );
  47.     private JButton sendButton  = new JButton( "Send Message" );
  48.     private JButton resetButton = new JButton( "Reset Interface" );
  49.     private JButton quitButton  = new JButton( "Quit program" );
  50.  
  51. public drawUI(){
  52.     getContentPane().setLayout( new FlowLayout() );
  53.     getContentPane().add( prompt );
  54.     getContentPane().add( input );
  55.     getContentPane().add( sendButton );
  56.     getContentPane().add( resetButton );
  57.     getContentPane().add( quitButton );
  58.     getContentPane().add( display );
  59.     display.setLineWrap( true );
  60.     display.setEditable( false );
  61.     quitButton.addActionListener( this );
  62. }//drawUI()
  63.  
  64.     public void actionPerformed( ActionEvent e ){
  65. //        if ( e.getSource() == quitButton){
  66.     //        public void closeTheWindwo( WindowEvent e ){
  67.     //            System.exit( 0 );
  68.         }//actionPerformed
  69.             
  70.     public void menuDraw(){
  71.         System.out.println( "Drawing the UI" );
  72.     }// menuDraw
  73.  
  74.  
  75. }// class
  76. @
  77.  
  78.  
  79. 1.1.1.1
  80. log
  81. @cantalope
  82. @
  83. text
  84. @@
  85.