Advertisement
jdalbey

IncidentHistoryPanelDriver.java

Apr 12th, 2016
162
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 1.15 KB | None | 0 0
  1. package tmcsim.simulationmanager;
  2.  
  3. import java.awt.BorderLayout;
  4. import java.util.Vector;
  5. import javax.swing.JFrame;
  6. import tmcsim.cadmodels.*;
  7. import tmcsim.client.cadclientgui.data.IncidentEvent;
  8.  
  9. /**
  10. * Driver to display a sample IncidentHistoryPanel
  11. * @author jdalbey
  12. */
  13. public class IncidentHistoryPanelDriver
  14. {
  15.  
  16. public static void main(String[] args)
  17. {
  18. // Create an IncidentEvent
  19. // The incident type is a 4-digit string (Use MMYY for month and year of your birth)
  20. // The incident location is the name of your home town
  21. // The incident details is a parade on the main street (provide street name for your home town)
  22. // Create an IncidentHistoryPanel
  23. // Add the event to the panel
  24.  
  25. // Create the frame.
  26. JFrame frame = new JFrame("Incident Panel Demo");
  27. // Specify closing behavior
  28. frame.setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE);
  29. // Add component to the frame.
  30. frame.getContentPane().add(ihPanel, BorderLayout.CENTER);
  31. // Size the frame.
  32. frame.pack();
  33. // Show it.
  34. frame.setVisible(true);
  35. }
  36. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement