📄 thirdpanel.java
字号:
package com.zlf.qqserver.systemset;
import java.awt.BorderLayout;
import javax.swing.Box;
import javax.swing.JLabel;
import javax.swing.JPanel;
import javax.swing.JTextField;
import javax.swing.border.TitledBorder;
public class ThirdPanel extends JPanel{
/**
*
*/
private static final long serialVersionUID = 7356354129901237448L;
private JLabel classDriverLable = new JLabel("库驱动类:");
private JLabel classStringLable = new JLabel("库连接串:");
private JLabel classUserLable = new JLabel("库用户名:");
private JLabel classPwdLable = new JLabel("库密码:");
private JTextField classDriverText = new JTextField(67);
private JTextField classStringText = new JTextField(67);
private JTextField classUserText = new JTextField(25);
private JTextField classPwdText = new JTextField(25);
private JPanel panel1=new JPanel();
private JPanel panel2=new JPanel();
private JPanel panel3=new JPanel();
private SystemSetPanel p;
public ThirdPanel(final SystemSetPanel p){
this.p=p;
this.setBorder(new TitledBorder("数据库相关设置"));
this.setLayout(new BorderLayout());
ini();
Box box=Box.createVerticalBox();
panel1.add(classDriverLable);
panel1.add(classDriverText);
panel2.add(classStringLable);
panel2.add(classStringText);
panel3.add(classUserLable);
panel3.add(classUserText);
panel3.add(Box.createHorizontalStrut(44));
panel3.add(classPwdLable);
panel3.add(classPwdText);//密码
// classPwdText.setEchoChar('*');
box.add(panel1);
box.add(panel2);
box.add(panel3);
this.add(box);
}
private void ini(){
if (p.getSecondPanel().getComboSort().getSelectedItem().equals("oracle")){
classDriverText.setText("oracle.jdbc.driver.OracleDriver");
classStringText.setText("jdbc:oracle:thin:@127.0.0.1:1521:Student");
classUserText.setText("system");
classPwdText.setText("oracle");
}
}
public JTextField getClassDriverText() {
return classDriverText;
}
public void setClassDriverText(JTextField classDriverText) {
this.classDriverText = classDriverText;
}
public JTextField getClassPwdText() {
return classPwdText;
}
public void setClassPwdText(JTextField classPwdText) {
this.classPwdText = classPwdText;
}
public JTextField getClassStringText() {
return classStringText;
}
public void setClassStringText(JTextField classStringText) {
this.classStringText = classStringText;
}
public JTextField getClassUserText() {
return classUserText;
}
public void setClassUserText(JTextField classUserText) {
this.classUserText = classUserText;
}
}
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -