COP 4610L - Spring 2005 - Java Code Examples


CHAPTER 2 - ADVANCED SWING GUI COMPONENTS

Part 1:

  • Image files
  • Simple Addition GUI - page 6
  • Labeling GUI components - page 11
  • Driver program for above
  • Grid Layout Manager Example - page 22
  • TextFields and Nested Classes Example - page 32
  • Driver program for above
  • Part 2:

  • JButton Example - page 12
  • Driver program for above
  • JCheckBox Example - page 17
  • Driver program for above
  • JRadioButton Example - page 21
  • Driver program for above
  • JComboBox Example - page 25
  • Driver program for above
  • JList Example - page 30
  • Driver program for above
  • Multiple Selection List Example - page 32
  • Driver program for above
  • Part 3:

  • Tracking Mouse Movement Example - page 6
  • Driver program for above
  • Illustration of an Adapter Class - page 12
  • Driver program for above
  • JTextArea Example - page 15
  • Driver program for above
  • Border Layout Manager Example - page 19
  • Driver program for above
  • Basic Window Pane for Web Browser - JEditorPane Example - page 25 - (RELOAD IMAGE FILE)
  • Tool Bar Class for Web Browser - page 27
  • Simple Web Browser with history - page 30
  • Web Browser extended with favorites (JSplitPane example) - page 34
  • HTML file containing "favorite" URLs - (required for above)
  • Web Browser (multiple page version - JTabbedPane example) - page 38
  • Drag and Drop Web Browser version - page 45


  • MULTI-THREADED APPLICATIONS

    Part 1:

  • Simple Thread Test Program - page 13
  • Example for Runnable Interface - page 16
  • Another simple thread example - page 25
  • Utilizing Timer Class and Threads - page 28
  • Sleeping a Thread Until a Specified Time - page 32
  • More on Sleeping Threads - page 45
  • Driver class for above - page 47
  • Part 2:

  • Class for Prime Number Determination - page 3
  • Driver program for determining prime numbers - page 4
  • Steam Boiler Simulator (Driver class) - page 7
  • Threaded pressure gauge checking for above - page 8
  • PRODUCER/CONSUMER PROBLEM
  • Producer Class - page 26
  • Consumer Class - page 27
  • Buffer Interface - page 28
  • Unsynchronized Buffer Class - page 28
  • Producer/Consumer Driver Class - UNSYNCHRONIZED - page 29
  • Synchronized Buffer Class - page 33
  • Producer/Consumer Driver Class - page 36


  • JAVA NETWORKING

    Part 2:

  • Simple UDP Server (non-GUI) - page 10
  • Simple UDP Client (non-GUI) - page 12
  • Simple TCP Server (non-GUI) - page 19
  • Simple TCP Client (non-GUI) - page 21
  • GUI-based TCP Server - page 25
  • Driver class for GUI-based TCP Server - page 41
  • GUI-based TCP Client - page 33
  • Driver class for GUI-based TCP Client - page 42
  • Part 3:

  • Multithreaded TicTacToe Server class
  • Test Class for TicTacToe Server
  • Client side for client/server TicTacToe
  • Test Class for TicTacToe Client
    Note: Before the following will execute you will need to run keytool to set up a keystore and certificate for the SSL
    Also, these two classes are in package: securitystuff/jsse.
  • SSL Server Class - page 20
  • SSL Client Class - page 23



  • Last updated: February 8, 2005
    Return to COP 4610L home page