📄 testframe.java.svn-base
字号:
package collector.gui.view;
import java.util.*;
import java.awt.event.*;
import javax.swing.*;
import javax.swing.table.*;
import collector.gui.method.*;
import collector.gui.model.*;
public class testframe
extends javax.swing.JFrame {
/** Creates new form testframe */
public testframe() {
jbInit();
PublicMethod.initColumnSizes(this.Table,
(AbstractTableModel) (this.Table.getModel()));
}
private void jbInit() { //GEN-BEGIN:jbInit
jPanel1 = new javax.swing.JPanel();
jScrollPane1 = new javax.swing.JScrollPane();
Table = new javax.swing.JTable();
jPanel2 = new javax.swing.JPanel();
jButton1 = new javax.swing.JButton();
addWindowListener(new java.awt.event.WindowAdapter() {
public void windowActivated(java.awt.event.WindowEvent evt) {
formWindowActivated(evt);
}
public void windowClosing(java.awt.event.WindowEvent evt) {
exitForm(evt);
}
public void windowDeactivated(java.awt.event.WindowEvent evt) {
formWindowDeactivated(evt);
}
public void windowDeiconified(java.awt.event.WindowEvent evt) {
formWindowDeiconified(evt);
}
public void windowIconified(java.awt.event.WindowEvent evt) {
formWindowIconified(evt);
}
});
jPanel1.setLayout(new java.awt.BorderLayout());
Table.setModel(new TermTaskTableModel());
Table.setAutoResizeMode(javax.swing.JTable.AUTO_RESIZE_OFF);
Table.addMouseListener(new java.awt.event.MouseAdapter() {
public void mousePressed(java.awt.event.MouseEvent evt) {
TableMousePressed(evt);
}
});
jScrollPane1.setViewportView(Table);
jPanel1.add(jScrollPane1, java.awt.BorderLayout.CENTER);
jButton1.setText("jButton1");
jButton1.addActionListener(new java.awt.event.ActionListener() {
public void actionPerformed(java.awt.event.ActionEvent evt) {
jButton1ActionPerformed(evt);
}
});
jPanel2.add(jButton1);
jPanel1.add(jPanel2, java.awt.BorderLayout.NORTH);
getContentPane().add(jPanel1, java.awt.BorderLayout.CENTER);
pack();
java.awt.Dimension screenSize = java.awt.Toolkit.getDefaultToolkit().
getScreenSize();
setSize(new java.awt.Dimension(321, 187));
setLocation( (screenSize.width - 321) / 2, (screenSize.height - 187) / 2);
} //GEN-END:jbInit
private void formWindowDeiconified(java.awt.event.WindowEvent evt) { //GEN-FIRST:event_formWindowDeiconified
// Add your handling code here:
System.out.println("formWindowDeiconified");
} //GEN-LAST:event_formWindowDeiconified
private void formWindowIconified(java.awt.event.WindowEvent evt) { //GEN-FIRST:event_formWindowIconified
// Add your handling code here:
System.out.println("formWindowIconified");
} //GEN-LAST:event_formWindowIconified
private void formWindowDeactivated(java.awt.event.WindowEvent evt) { //GEN-FIRST:event_formWindowDeactivated
// Add your handling code here:
System.out.println("formWindowDeactivated");
System.out.println("isShowing or not " + this.isShowing());
this.show();
} //GEN-LAST:event_formWindowDeactivated
private void formWindowActivated(java.awt.event.WindowEvent evt) { //GEN-FIRST:event_formWindowActivated
// Add your handling code here:
System.out.println("formWindowActivated");
} //GEN-LAST:event_formWindowActivated
private void jButton1ActionPerformed(java.awt.event.ActionEvent evt) { //GEN-FIRST:event_jButton1ActionPerformed
// Add your handling code here:
System.out.println("ready to show a panel");
} //GEN-LAST:event_jButton1ActionPerformed
private void TableMousePressed(java.awt.event.MouseEvent evt) { //GEN-FIRST:event_TableMousePressed
// Add your handling code here:
System.out.println("jTable1MousePressed");
} //GEN-LAST:event_TableMousePressed
/** Exit the Application */
private void exitForm(java.awt.event.WindowEvent evt) { //GEN-FIRST:event_exitForm
System.exit(0);
} //GEN-LAST:event_exitForm
public static void main(String args[]) {
new testframe().show();
Object[] array1 = new Object[] {
"I ", "am ", "the ", "April fool,"};
Object[] array2 = new Object[] {
" Do ", "u ", "think ", "so ", "???"};
ArrayList ArrayList1 = new ArrayList();
for (int i = 0; i < array1.length; i++) {
ArrayList1.add(i, array1[i]);
}
ArrayList ArrayList2 = new ArrayList();
for (int i = 0; i < array2.length; i++) {
ArrayList2.add(i, array2[i]);
}
LinkedList ALinkedList = new LinkedList(ArrayList1);
LinkedList BLinkedList = new LinkedList(ArrayList2);
LinkedList m_list = new LinkedList();
System.out.println("BLinkedList is " + BLinkedList);
System.out.println("ALinkedList is " + ALinkedList);
System.out.println("the class of BLinkedList is " +
BLinkedList.getClass().getName());
ALinkedList.addAll(BLinkedList);
System.out.println("ALinkedList+BLinkedList = " + ALinkedList);
Object[] aa = ALinkedList.toArray();
for (int i = 0; i < aa.length; i++) {
System.out.print(aa[i]);
}
System.out.println("");
}
// Variables declaration - do not modify//GEN-BEGIN:variables
private javax.swing.JScrollPane jScrollPane1;
private javax.swing.JTable Table;
private javax.swing.JButton jButton1;
private javax.swing.JPanel jPanel2;
private javax.swing.JPanel jPanel1;
// End of variables declaration//GEN-END:variables
}
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -