class FileList
        extends JInternalFrame implements DropTargetListener {

    private static final long serialVersionUID = -7238230038043975672L;

    private final Vector<RowContainer> filevector = new Vector<>();
    private final JPanel jPanel1 = new JPanel();
    private final BorderLayout borderLayout1 = new BorderLayout();
    private final JPanel jPanel2 = new JPanel();
    private final BorderLayout borderLayout2 = new BorderLayout();
    private final JScrollPane jScrollPane1 = new JScrollPane();
    private final FileTableModel model = new FileTableModel();
    private final JTable jTable1 = new JTable(model);
    private final RowSorter<TableModel> sorter = new TableRowSorter<>(model);
    private final BorderLayout borderLayout3 = new BorderLayout();
    private final DropTarget dt = new DropTarget(this, DnDConstants.ACTION_COPY_OR_MOVE, this, true, null);
    private final JPanel jPanel3 = new JPanel();
    private final JLabel jLabel1 = new JLabel();
    private final JLabel jLabel2 = new JLabel();

    public FileList() {
        super("FileList", true, true, true);
        try {
            jbInit();
        } catch (Exception ex) {
            ex.printStackTrace();
        }
    }

    private void jbInit() {<FILL_FUNCTION_BODY>}

    public void dragEnter(DropTargetDragEvent dtde) {
    }

    public void dragOver(DropTargetDragEvent dtde) {
    }

    public void dropActionChanged(DropTargetDragEvent dtde) {
        System.out.println("actionchanged");
    }

    public void drop(DropTargetDropEvent dtde) {
        if ((dtde.getDropAction() & DnDConstants.ACTION_COPY_OR_MOVE) == 0) {
            dtde.rejectDrop();
            return;
        }
        dtde.acceptDrop(DnDConstants.ACTION_COPY);

        Transferable transferable = dtde.getTransferable();
        try {
            // Transferable is not generic, so the cast can only be unchecked.
            @SuppressWarnings("unchecked")
            List<File> filelist = (List<File>) transferable.getTransferData(DataFlavor.javaFileListFlavor);
            for (File f : filelist) {
                filevector.add(new RowContainer(f));

                model.fireTableDataChanged();
                System.out.println(f.toString());
            }
        } catch (IOException | UnsupportedFlavorException ex) {
            ex.printStackTrace();
        }
        dtde.dropComplete(true);
        File[] filar = new File[filevector.size()];
        for (int i = 0; i < filevector.size(); i++) {
            filar[i] = filevector.get(i).getFile();
        }
        super.firePropertyChange("filevector",
                null, filar);
    }

    public void dragExit(DropTargetEvent dte) {
    }

    public void jTable1_keyPressed(KeyEvent e) {
        if (e.getKeyCode() == 127) {
            int[] selected = jTable1.getSelectedRows();
            for (int i = selected.length - 1; i >= 0; i--) {
                model.removeRow(selected[i]);
                model.fireTableDataChanged();
            }
        }
    }

    public void ftm_tableChanged(TableModelEvent e) {
        int sum = 0;
        for (RowContainer c : filevector) {
            sum += c.getPages();
        }
        this.jLabel2.setText(Integer.toString(sum));
    }

    public Vector<RowContainer> getFilevector() {
        return filevector;
    }

    public String getStringreprasentation() {
        StringBuilder sb = new StringBuilder();
        List<RowContainer> vec = getFilevector();
        for (RowContainer c : vec) {
            sb.append(c.getFile().getAbsolutePath()).append('\n');
        }
        return sb.toString();
    }

    static class FileListFtmTableModelAdapter
            implements TableModelListener {

        private final FileList adaptee;

        FileListFtmTableModelAdapter(FileList adaptee) {
            this.adaptee = adaptee;
        }

        public void tableChanged(TableModelEvent e) {
            adaptee.ftm_tableChanged(e);
        }
    }

    static class FileListJTable1KeyAdapter
            extends KeyAdapter {

        private final FileList adaptee;

        FileListJTable1KeyAdapter(FileList adaptee) {
            this.adaptee = adaptee;
        }

        public void keyPressed(KeyEvent e) {
            adaptee.jTable1_keyPressed(e);
        }
    }

    static class RowContainer {

        private File file;
        private int pages;

        /**
         * RowContainer
         */
        RowContainer(File file) {
            this.file = file;
            PdfReader reader = null;
            try {
                reader = new PdfReader(file.getAbsolutePath());
            } catch (IOException ignored) {
            }
            this.pages = reader.getNumberOfPages();
        }

        public File getFile() {
            return file;
        }

        public void setFile(File file) {
            this.file = file;
        }

        public int getPages() {
            return pages;
        }

        public void setPages(int pages) {
            this.pages = pages;
        }
    }

    class FileTableModel extends AbstractTableModel {

        private static final long serialVersionUID = -8173736343997473512L;
        private final String[] columnNames = {
                "Filename", "Pages", "Directory"};

        public int getColumnCount() {
            return columnNames.length;
        }

        public int getRowCount() {
            return filevector.size();
        }

        public String getColumnName(int col) {
            return columnNames[col];
        }

        public Object getValueAt(int row, int col) {
            switch (col) {
                case 0:
                    return filevector.get(row).getFile().getName();
                case 1:
                    return filevector.get(row).getPages();
                case 2:
                    return filevector.get(row).getFile().getParent();
            }
            return null;
        }

        public Class<?> getColumnClass(int col) {
            switch (col) {
                case 0:
                    return String.class;
                case 1:
                    return Integer.class;
                case 2:
                    return String.class;
            }
            return null;
        }

        public void removeRow(int row) {
            filevector.remove(row);
        }
    }
}

        this.getContentPane().setLayout(borderLayout1);
        jTable1.addKeyListener(new FileListJTable1KeyAdapter(this));
        jLabel1.setText("pages");
        jLabel2.setText("-");
        model.addTableModelListener(new FileListFtmTableModelAdapter(this));
        this.getContentPane().add(jPanel1, java.awt.BorderLayout.CENTER);
        jPanel1.setLayout(borderLayout2);
        jPanel2.setLayout(borderLayout3);
        jPanel1.add(jPanel2, java.awt.BorderLayout.CENTER);
        jPanel2.add(jScrollPane1, java.awt.BorderLayout.CENTER);
        jPanel1.add(jPanel3, java.awt.BorderLayout.NORTH);
        jPanel3.add(jLabel2);
        jPanel3.add(jLabel1);
        jScrollPane1.setViewportView(jTable1);
        jTable1.setRowSorter(sorter);
//    this.setSize(200,100);
        this.pack();
    
<methods>public void <init>() ,public void <init>(java.lang.String) ,public void <init>(java.lang.String, boolean) ,public void <init>(java.lang.String, boolean, boolean) ,public void <init>(java.lang.String, boolean, boolean, boolean) ,public void <init>(java.lang.String, boolean, boolean, boolean, boolean) ,public void addInternalFrameListener(javax.swing.event.InternalFrameListener) ,public void dispose() ,public void doDefaultCloseAction() ,public javax.accessibility.AccessibleContext getAccessibleContext() ,public java.awt.Container getContentPane() ,public int getDefaultCloseOperation() ,public javax.swing.JInternalFrame.JDesktopIcon getDesktopIcon() ,public javax.swing.JDesktopPane getDesktopPane() ,public final java.awt.Container getFocusCycleRootAncestor() ,public java.awt.Component getFocusOwner() ,public javax.swing.Icon getFrameIcon() ,public java.awt.Component getGlassPane() ,public javax.swing.event.InternalFrameListener[] getInternalFrameListeners() ,public javax.swing.JMenuBar getJMenuBar() ,public java.awt.Cursor getLastCursor() ,public int getLayer() ,public javax.swing.JLayeredPane getLayeredPane() ,public javax.swing.JMenuBar getMenuBar() ,public java.awt.Component getMostRecentFocusOwner() ,public java.awt.Rectangle getNormalBounds() ,public javax.swing.JRootPane getRootPane() ,public java.lang.String getTitle() ,public javax.swing.plaf.InternalFrameUI getUI() ,public java.lang.String getUIClassID() ,public final java.lang.String getWarningString() ,public void hide() ,public boolean isClosable() ,public boolean isClosed() ,public final boolean isFocusCycleRoot() ,public boolean isIcon() ,public boolean isIconifiable() ,public boolean isMaximizable() ,public boolean isMaximum() ,public boolean isResizable() ,public boolean isSelected() ,public void moveToBack() ,public void moveToFront() ,public void pack() ,public void remove(java.awt.Component) ,public void removeInternalFrameListener(javax.swing.event.InternalFrameListener) ,public void reshape(int, int, int, int) ,public void restoreSubcomponentFocus() ,public void setClosable(boolean) ,public void setClosed(boolean) throws java.beans.PropertyVetoException,public void setContentPane(java.awt.Container) ,public void setCursor(java.awt.Cursor) ,public void setDefaultCloseOperation(int) ,public void setDesktopIcon(javax.swing.JInternalFrame.JDesktopIcon) ,public final void setFocusCycleRoot(boolean) ,public void setFrameIcon(javax.swing.Icon) ,public void setGlassPane(java.awt.Component) ,public void setIcon(boolean) throws java.beans.PropertyVetoException,public void setIconifiable(boolean) ,public void setJMenuBar(javax.swing.JMenuBar) ,public void setLayer(java.lang.Integer) ,public void setLayer(int) ,public void setLayeredPane(javax.swing.JLayeredPane) ,public void setLayout(java.awt.LayoutManager) ,public void setMaximizable(boolean) ,public void setMaximum(boolean) throws java.beans.PropertyVetoException,public void setMenuBar(javax.swing.JMenuBar) ,public void setNormalBounds(java.awt.Rectangle) ,public void setResizable(boolean) ,public void setSelected(boolean) throws java.beans.PropertyVetoException,public void setTitle(java.lang.String) ,public void setUI(javax.swing.plaf.InternalFrameUI) ,public void show() ,public void toBack() ,public void toFront() ,public void updateUI() <variables>public static final java.lang.String CONTENT_PANE_PROPERTY,public static final java.lang.String FRAME_ICON_PROPERTY,public static final java.lang.String GLASS_PANE_PROPERTY,public static final java.lang.String IS_CLOSED_PROPERTY,public static final java.lang.String IS_ICON_PROPERTY,public static final java.lang.String IS_MAXIMUM_PROPERTY,public static final java.lang.String IS_SELECTED_PROPERTY,public static final java.lang.String LAYERED_PANE_PROPERTY,public static final java.lang.String MENU_BAR_PROPERTY,private static final java.lang.Object PROPERTY_CHANGE_LISTENER_KEY,public static final java.lang.String ROOT_PANE_PROPERTY,public static final java.lang.String TITLE_PROPERTY,protected boolean closable,boolean danger,private int defaultCloseOperation,protected javax.swing.JInternalFrame.JDesktopIcon desktopIcon,protected javax.swing.Icon frameIcon,protected boolean iconable,protected boolean isClosed,boolean isDragging,protected boolean isIcon,protected boolean isMaximum,protected boolean isSelected,private java.awt.Cursor lastCursor,private java.awt.Component lastFocusOwner,protected boolean maximizable,private java.awt.Rectangle normalBounds,private boolean opened,protected boolean resizable,protected javax.swing.JRootPane rootPane,protected boolean rootPaneCheckingEnabled,protected java.lang.String title,private static final java.lang.String uiClassID