Records.java
上传用户:xinkaifrp
上传日期:2021-05-08
资源大小:372k
文件大小:3k
- /*
- * To change this template, choose Tools | Templates
- * and open the template in the editor.
- */
- /*
- * Records.java
- *
- * Created on 2009-6-25, 15:50:02
- */
- package com.financing;
- import com.financing.dao.RecordDao;
- /**
- *
- * @author Administrator
- */
- public class Records extends javax.swing.JFrame {
- private Integer userId;
- public void setUserId(Integer userId) {
- this.userId = userId;
- }
-
- /** Creates new form Records */
- public Records() {
- initComponents();
- this.setLocation(300, 200);
-
- }
- public void setTalbeModel(){
- jTable1.setModel(new RecordDao().getUserRecord(userId));
- }
- @SuppressWarnings("unchecked")
- // <editor-fold defaultstate="collapsed" desc="Generated Code">//GEN-BEGIN:initComponents
- private void initComponents() {
- jScrollPane1 = new javax.swing.JScrollPane();
- jTable1 = new javax.swing.JTable();
- setDefaultCloseOperation(javax.swing.WindowConstants.DISPOSE_ON_CLOSE);
- jTable1.setModel(new javax.swing.table.DefaultTableModel(
- new Object [][] {
- {null, null, null, null},
- {null, null, null, null}
- },
- new String [] {
- "Title 1", "Title 2", "Title 3", "Title 4"
- }
- ) {
- boolean[] canEdit = new boolean [] {
- false, false, false, false
- };
- public boolean isCellEditable(int rowIndex, int columnIndex) {
- return canEdit [columnIndex];
- }
- });
- jScrollPane1.setViewportView(jTable1);
- javax.swing.GroupLayout layout = new javax.swing.GroupLayout(getContentPane());
- getContentPane().setLayout(layout);
- layout.setHorizontalGroup(
- layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
- .addGroup(layout.createSequentialGroup()
- .addContainerGap()
- .addComponent(jScrollPane1, javax.swing.GroupLayout.DEFAULT_SIZE, 323, Short.MAX_VALUE)
- .addContainerGap())
- );
- layout.setVerticalGroup(
- layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
- .addGroup(layout.createSequentialGroup()
- .addContainerGap()
- .addComponent(jScrollPane1, javax.swing.GroupLayout.PREFERRED_SIZE, 301, javax.swing.GroupLayout.PREFERRED_SIZE)
- .addContainerGap(99, Short.MAX_VALUE))
- );
- pack();
- }// </editor-fold>//GEN-END:initComponents
-
- // Variables declaration - do not modify//GEN-BEGIN:variables
- private javax.swing.JScrollPane jScrollPane1;
- private javax.swing.JTable jTable1;
- // End of variables declaration//GEN-END:variables
- }