Advertisement
Guest User

Untitled

a guest
Jun 28th, 2017
64
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Java 1.13 KB | None | 0 0
  1. import java.awt.*;
  2. import javax.swing.*;
  3. import java.text.*;
  4. import java.awt.event.*;
  5. import javax.swing.border.*;
  6. import java.io.*;
  7.  
  8. public class Vehicle implements ActionListener{
  9.  
  10.     JPanel workOrderList = new JPanel();
  11.     JScrollPane vehicleScroll = new JScrollPane(workOrderList, JScrollPane.VERTICAL_SCROLLBAR_AS_NEEDED, JScrollPane.HORIZONTAL_SCROLLBAR_AS_NEEDED);
  12.    
  13.     public Vehicle(){
  14.  
  15.         add(vehicleScroll);    
  16.     }
  17.    
  18.     private void makeWorkOrderList(){
  19.  
  20.         for (int j = 0; j < fileCount - 1; j++){
  21.  
  22. //create the new work order object
  23.             woListItems[j] = new WorkListItem();
  24.            
  25. //add a blank space between the work order items in the list
  26.  
  27.             workOrderList.add(Box.createRigidArea(new Dimension(2, 2)));
  28.            
  29. //assign a work order file from workOrderDir to each workOrderItem object
  30.  
  31.             woListItems[j].fileName = listOfFiles[j].getName();
  32.             woListItems[j].filePath = filePath + model + System.getProperty("file.separator");
  33.             woListItems[j].initWorkOrderList();
  34.  
  35. //adding a reference to the item list to each work list item
  36. //          woListItems[j].listRef = workOrderList;
  37.             workOrderList.add(woListItems[j]);
  38.         }
  39.     }
  40.  
  41. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement