教师留言java代码 用java写给教师排课( 五 )


}
/**
* This method initializes jTextField
*
* @return javax.swing.JTextField
*/
private JTextField getJTextField() {
if (jTextField == null) {
jTextField = new JTextField();
jTextField.setBounds(new Rectangle(265, 407, 231, 24));
}
return jTextField;
}
/**
* This method initializes jButton
*
* @return javax.swing.JButton
*/
private JButton getJButton() {
if (jButton == null) {
jButton = new JButton();
jButton.setBounds(new Rectangle(505, 407, 70, 24));
jButton.setText("提交");
jButton.addActionListener(new java.awt.event.ActionListener() {
public void actionPerformed(java.awt.event.ActionEvent e) {
jTextArea.setText(jTextArea.getText()+"\r\n"+"你"+jComboBox.getSelectedItem().toString()+"地说:"+jTextField.getText());
}
});
}
return jButton;
}
/**
* This method initializes jButton1
*
* @return javax.swing.JButton
*/
private JButton getJButton1() {
if (jButton1 == null) {
jButton1 = new JButton();
jButton1.setBounds(new Rectangle(565, 51, 60, 32));
jButton1.setText("清屏");
jButton1.addActionListener(new java.awt.event.ActionListener() {
public void actionPerformed(java.awt.event.ActionEvent e) {
jTextArea.setText("留言内容:");
}
});
}
return jButton1;
}
/**
* This method initializes jButton2
*
* @return javax.swing.JButton
*/
private JButton getJButton2() {
if (jButton2 == null) {
jButton2 = new JButton();
jButton2.setBounds(new Rectangle(565, 112, 60, 32));
jButton2.setText("置顶");
jButton2.addActionListener(new java.awt.event.ActionListener() {
public void actionPerformed(java.awt.event.ActionEvent e) {
jTextArea.setCaretPosition(0);
}
});
}
return jButton2;
}
/**
* This method initializes jButton3
*
* @return javax.swing.JButton
*/
private JButton getJButton3() {
if (jButton3 == null) {
jButton3 = new JButton();
jButton3.setBounds(new Rectangle(565, 173, 60, 32));
jButton3.setText("至尾");
jButton3.addActionListener(new java.awt.event.ActionListener() {
public void actionPerformed(java.awt.event.ActionEvent e) {
jTextArea.setCaretPosition((int)jTextArea.getText().length());
}
});
}
return jButton3;
}
public static void main(String args[]){
new Liuyb();
}
}
【教师留言java代码 用java写给教师排课】关于教师留言java代码和用java写给教师排课的介绍到此就结束了,不知道你从中找到你需要的信息了吗 ?如果你还想了解更多这方面的信息,记得收藏关注本站 。

推荐阅读