You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

AdressTable.java 2.5KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677787980818283848586878889
  1. /*
  2. * To change this license header, choose License Headers in Project Properties.
  3. * To change this template file, choose Tools | Templates
  4. * and open the template in the editor.
  5. */
  6. package prfourgui.View;
  7. /**
  8. *
  9. * @author baumannan68085
  10. */
  11. public class AdressTable extends javax.swing.JPanel
  12. {
  13. /**
  14. * @return the jTable1
  15. */
  16. public javax.swing.JTable getTblAdressbuch()
  17. {
  18. return tblAdressbuch;
  19. }
  20. /**
  21. * @param tblAdressbuch the jTable1 to set
  22. */
  23. public void setTblAdressbuch(javax.swing.JTable tblAdressbuch)
  24. {
  25. this.tblAdressbuch = tblAdressbuch;
  26. }
  27. /**
  28. * Creates new form AdressTable
  29. */
  30. public AdressTable()
  31. {
  32. initComponents();
  33. }
  34. /**
  35. * This method is called from within the constructor to initialize the form.
  36. * WARNING: Do NOT modify this code. The content of this method is always
  37. * regenerated by the Form Editor.
  38. */
  39. @SuppressWarnings("unchecked")
  40. // <editor-fold defaultstate="collapsed" desc="Generated Code">//GEN-BEGIN:initComponents
  41. private void initComponents() {
  42. popupMenu = new javax.swing.JPopupMenu();
  43. deleteItem = new javax.swing.JMenuItem();
  44. jScrollPane1 = new javax.swing.JScrollPane();
  45. tblAdressbuch = new javax.swing.JTable();
  46. deleteItem.setIcon(new javax.swing.ImageIcon(getClass().getResource("/prfourgui/Icons/Delete24.gif"))); // NOI18N
  47. deleteItem.setText("Remove");
  48. popupMenu.add(deleteItem);
  49. setLayout(new javax.swing.BoxLayout(this, javax.swing.BoxLayout.LINE_AXIS));
  50. tblAdressbuch.setModel(new javax.swing.table.DefaultTableModel(
  51. new Object [][] {
  52. {null, null, null, null},
  53. {null, null, null, null},
  54. {null, null, null, null},
  55. {null, null, null, null}
  56. },
  57. new String [] {
  58. "Name", "Telefon", "Mobil", "E-Mail"
  59. }
  60. ));
  61. tblAdressbuch.setComponentPopupMenu(popupMenu);
  62. jScrollPane1.setViewportView(tblAdressbuch);
  63. add(jScrollPane1);
  64. }// </editor-fold>//GEN-END:initComponents
  65. // Variables declaration - do not modify//GEN-BEGIN:variables
  66. private javax.swing.JMenuItem deleteItem;
  67. private javax.swing.JScrollPane jScrollPane1;
  68. private javax.swing.JPopupMenu popupMenu;
  69. private javax.swing.JTable tblAdressbuch;
  70. // End of variables declaration//GEN-END:variables
  71. /**
  72. * @return the deleteItem
  73. */
  74. public javax.swing.JMenuItem getDeleteItem() {
  75. return deleteItem;
  76. }
  77. }