Advertisement
m1o2

ViewCustomerOrders

Sep 14th, 2012
34
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 2.26 KB | None | 0 0
  1. package windows;
  2.  
  3. import java.awt.Rectangle;
  4.  
  5. import javax.swing.JButton;
  6. import javax.swing.JInternalFrame;
  7. import javax.swing.JScrollPane;
  8. import javax.swing.JTable;
  9. import javax.swing.table.DefaultTableModel;
  10.  
  11. import core.Customer;
  12.  
  13. public class ViewCustomerOrders extends JInternalFrame {
  14.  
  15. private static final long serialVersionUID = 7618570131545915037L;
  16. private OshisFurnituresFrame frame;
  17. private Customer customer;
  18. private JScrollPane scrollPane;
  19. private JButton closeButton;
  20. private JTable table;
  21.  
  22. public ViewCustomerOrders( OshisFurnituresFrame frame, Customer customer ) {
  23. setBounds(new Rectangle(0, 0, 284, 300));
  24. setTitle("View Paid Orders");
  25.  
  26. setFrame(frame);
  27. setCustomer(customer);
  28. }
  29.  
  30. public OshisFurnituresFrame getFrame() {
  31. return frame;
  32. }
  33.  
  34. public void setFrame(OshisFurnituresFrame frame) {
  35. this.frame = frame;
  36. getContentPane().setLayout(null);
  37.  
  38. scrollPane = new JScrollPane();
  39. scrollPane.setBounds(12, 13, 247, 211);
  40. scrollPane.setName("scrollPane");
  41. getContentPane().add(scrollPane);
  42.  
  43. table = new JTable();
  44. table.setModel(new DefaultTableModel(
  45. new Object[][] {
  46. },
  47. new String[] {
  48. "Items", "Quantity"
  49. }
  50. ) {
  51. boolean[] columnEditables = new boolean[] {
  52. false, false
  53. };
  54. public boolean isCellEditable(int row, int column) {
  55. return columnEditables[column];
  56. }
  57. });
  58. table.setName("table");
  59. scrollPane.setViewportView(table);
  60.  
  61. closeButton = new JButton("Close");
  62. closeButton.setBounds(22, 234, 89, 23);
  63. closeButton.setName("closeButton");
  64. getContentPane().add(closeButton);
  65. }
  66.  
  67. public static long getSerialversionuid() {
  68. return serialVersionUID;
  69. }
  70.  
  71. public Customer getCustomer() {
  72. return customer;
  73. }
  74.  
  75. public void setCustomer(Customer customer) {
  76. this.customer = customer;
  77. }
  78.  
  79. public JScrollPane getScrollPane() {
  80. return scrollPane;
  81. }
  82.  
  83. public void setScrollPane(JScrollPane scrollPane) {
  84. this.scrollPane = scrollPane;
  85. }
  86.  
  87. public JButton getCloseButton() {
  88. return closeButton;
  89. }
  90.  
  91. public void setCloseButton(JButton closeButton) {
  92. this.closeButton = closeButton;
  93. }
  94.  
  95. public JTable getTable() {
  96. return table;
  97. }
  98.  
  99. public void setTable(JTable table) {
  100. this.table = table;
  101. }
  102. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement