Advertisement
Guest User

Untitled

a guest
Feb 20th, 2019
183
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 2.37 KB | None | 0 0
  1. /*
  2. * Homework 3: Primitive Directory & Copier
  3. Paul MacLean (MAC7537@calu.edu), Michael Gorse (GOR9632@calu.edu), Anthony Carrola (CAR3766@calu.edu)
  4. Group 8 (2^3)
  5. CET 350 - Technical Computer using Java
  6. */
  7.  
  8.  
  9. import java.io.*;
  10. import java.awt.*;
  11. import java.util.*;
  12. import java.lang.*;
  13. import java.awt.List;
  14. import java.awt.event.*;
  15.  
  16.  
  17. class Bounce extends Frame implements ActionListener,WindowListener
  18. {
  19. private static final long serialVersionUID = 1L;
  20.  
  21.  
  22.  
  23. private static int FRAME_X = 800;
  24. private static int FRAME_Y = 500;
  25.  
  26. private static int NetBarWidth = 300;
  27. private static int MenuElementXSize = 70;
  28. private static int MenuElementYSize = 30;
  29. private static int MenuElementYPos = FRAME_Y - 50;
  30.  
  31.  
  32.  
  33. private Button RunButton = new Button("Run");
  34. private Button CircleButton = new Button("Circle");
  35. private Button TailButton = new Button("Tail");
  36. private Button ClearButton = new Button("Clear");
  37. private Button QuitButton = new Button("Quit");
  38.  
  39. private Panel SpeedBarPanel = new Panel();
  40. private Scrollbar SpeedBar = new Scrollbar(Scrollbar.HORIZONTAL, 50, 1, 2, 100);
  41. //private Scrollbar SizeBar = new Scrollbar(Scrollbar.HORIZONTAL, 50, 0, 2, 100);
  42.  
  43. private Label SpeedLabel = new Label("Speed");
  44. private Label SizeDisplay = new Label("Size");
  45.  
  46.  
  47.  
  48. Bounce() {
  49. drawFrame();
  50.  
  51.  
  52.  
  53. this.add(SpeedBar);
  54.  
  55. SpeedBar.setVisible(true);
  56.  
  57. this.setSize(FRAME_X, FRAME_Y); //OFFSET 32Y
  58. this.setVisible(true);
  59. this.setResizable(true);
  60. this.setTitle("howdy");
  61.  
  62. this.addWindowListener(this);
  63. this.requestFocus();
  64. }
  65.  
  66. public static void main(String[] args) throws IOException
  67. {
  68. new Bounce();
  69. }
  70.  
  71. private void drawFrame() {
  72. System.out.println("HELLO");
  73. SpeedBar.setSize(5, 5);
  74.  
  75. System.out.println(SpeedBar.getSize());
  76.  
  77. }
  78.  
  79.  
  80.  
  81. public void windowActivated(WindowEvent e) {
  82.  
  83. }
  84.  
  85. public void windowClosed(WindowEvent e) {
  86. System.exit(0);
  87. }
  88.  
  89. public void windowClosing(WindowEvent e) {
  90. this.removeWindowListener(this);
  91. this.dispose();
  92. }
  93.  
  94. public void windowDeactivated(WindowEvent e) {
  95.  
  96. }
  97.  
  98. public void windowDeiconified(WindowEvent e) {
  99.  
  100. }
  101.  
  102. public void windowIconified(WindowEvent e) {
  103.  
  104. }
  105.  
  106. public void windowOpened(WindowEvent e) {
  107.  
  108. }
  109.  
  110. public void actionPerformed(ActionEvent e) {
  111.  
  112. }
  113. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement