📄 shopmis.java~359~
字号:
jPanel5.add(jButton4, null);
jPanel5.add(jLabel20, null);
jPanel5.add(jButton7, null);
jPanel5.add(jScrollPane1, null);
jPanel5.add(jButton9, null);
jScrollPane1.getViewport().add(jTextArea1, null);
jPanel2.add(jPanel6, "jPanel6");
jPanel6.add(jLabel8, null);
jPanel6.add(jLabel10, null);
jPanel6.add(jLabel11, null);
jPanel6.add(jLabel15, null);
jPanel6.add(jLabel13, null);
jPanel6.add(jLabel16, null);
jPanel6.add(jLabel17, null);
jPanel6.add(jLabel18, null);
jPanel6.add(jTextField2, null);
jPanel6.add(jTextField11, null);
jPanel6.add(jTextField10, null);
jPanel6.add(jTextField9, null);
jPanel6.add(jTextField7, null);
jPanel6.add(jTextField5, null);
jPanel6.add(jTextField4, null);
jPanel6.add(jTextField12, null);
jPanel6.add(jLabel19, null);
jPanel6.add(jLabel21, null);
jPanel6.add(jTextField14, null);
jPanel6.add(jTextField15, null);
jPanel6.add(jLabel22, null);
jPanel6.add(jLabel23, null);
jPanel6.add(jTextField16, null);
jPanel2.add(jPanel7, "jPanel7");
jPanel7.add(jLabel24, null);
jPanel7.add(jLabel25, null);
jPanel7.add(jLabel26, null);
jPanel7.add(jTextField18, null);
jPanel7.add(jButton6, null);
jPanel7.add(jTextField13, null);
jPanel7.add(jButton3, null);
jPanel2.add(jPanel16, "jPanel16");
jPanel16.add(jTextField32, null);
jPanel16.add(jLabel47, null);
jPanel16.add(jLabel48, null);
jPanel16.add(jLabel44, null);
jPanel16.add(jTextField31, null);
jPanel16.add(jLabel49, null);
jPanel16.add(jTextField34, null);
jPanel16.add(jLabel45, null);
jPanel16.add(jLabel46, null);
jPanel16.add(jTextField33, null);
jPanel16.add(jButton25, null);
jPanel16.add(jScrollPane7, null);
jPanel16.add(jLabel50, null);
jPanel16.add(jButton24, null);
jPanel16.add(jButton23, null);
jScrollPane7.getViewport().add(jTextArea7, null);
jPanel2.add(jPanel17, "jPanel17");
jPanel17.add(jPanel19, "jPanel19");
jPanel19.add(jLabel52, null);
jPanel19.add(jButton27, null);
jPanel19.add(jLabel58, null);
jPanel19.add(jTextField36, null);
jPanel19.add(jTextField42, null);
jPanel17.add(jPanel20, "jPanel20");
jPanel20.add(jLabel60, null);
jPanel20.add(jLabel53, null);
jPanel20.add(jTextField37, null);
jPanel20.add(jTextField44, null);
jPanel20.add(jButton28, null);
jPanel17.add(jPanel21, "jPanel21");
jPanel21.add(jLabel61, null);
jPanel21.add(jTextField45, null);
jPanel21.add(jTextField38, null);
jPanel21.add(jLabel54, null);
jPanel21.add(jButton29, null);
jPanel17.add(jPanel22, "jPanel22");
jPanel22.add(jTextField40, null);
jPanel22.add(jTextField41, null);
jPanel22.add(jLabel55, null);
jPanel22.add(jLabel56, null);
jPanel22.add(jLabel57, null);
jPanel22.add(jTextField39, null);
jPanel22.add(jButton30, null);
jPanel22.add(jLabel59, null);
jPanel22.add(jTextField43, null);
jPanel2.add(jPanel18, "jPanel18");
jPanel18.add(jTextField35, null);
jPanel18.add(jLabel51, null);
jPanel18.add(jButton26, null);
jPanel18.add(jScrollPane8, null);
jScrollPane8.getViewport().add(jTextArea8, null);
this.getContentPane().add(jPanel3, "jPanel3");
jPanel3.add(jPanel8, "jPanel8");
jPanel8.add(jLabel6, null);
jPanel8.add(jScrollPane2, null);
jPanel8.add(jButton8, null);
jPanel3.add(jPanel9, "jPanel9");
jPanel9.add(jScrollPane3, null);
jPanel9.add(jButton10, null);
jPanel3.add(jPanel10, "jPanel10");
jPanel10.add(jScrollPane4, null);
jPanel10.add(jLabel28, null);
jPanel10.add(jLabel27, null);
jPanel10.add(jTextField17, null);
jPanel10.add(jButton12, null);
jPanel10.add(jButton11, null);
jPanel10.add(jButton5, null);
jPanel10.add(jButton13, null);
jPanel3.add(jPanel12, "jPanel12");
jPanel12.add(jTextField21, null);
jPanel12.add(jLabel32, null);
jPanel12.add(jLabel33, null);
jPanel12.add(jButton17, null);
jPanel12.add(jButton18, null);
jPanel12.add(jLabel34, null);
jPanel12.add(jScrollPane6, null);
jScrollPane6.getViewport().add(jTextArea6, null);
jPanel12.add(jTextField20, null);
jPanel3.add(jPanel13, "jPanel13");
jPanel13.add(jTextField22, null);
jPanel13.add(jLabel35, null);
jPanel13.add(jButton19, null);
jPanel3.add(jPanel14, "jPanel14");
jPanel14.add(jLabel36, null);
jPanel14.add(jLabel37, null);
jPanel14.add(jLabel38, null);
jPanel14.add(jLabel39, null);
jPanel14.add(jLabel40, null);
jPanel14.add(jTextField23, null);
jPanel14.add(jTextField24, null);
jPanel14.add(jTextField25, null);
jPanel14.add(jTextField26, null);
jPanel14.add(jTextField27, null);
jPanel14.add(jButton20, null);
jPanel3.add(jPanel15, "jPanel15");
jPanel15.add(jLabel41, null);
jPanel15.add(jTextField28, null);
jPanel15.add(jButton21, null);
jPanel15.add(jTextField29, null);
jPanel15.add(jTextField30, null);
jPanel15.add(jLabel42, null);
jPanel15.add(jLabel43, null);
jPanel15.add(jButton22, null);
jScrollPane4.getViewport().add(jTextArea4, null);
jScrollPane3.getViewport().add(jTextArea3, null);
jScrollPane2.getViewport().add(jTextArea2, null);
this.getContentPane().add(jPanel4, "jPanel4");
jPanel4.add(jPanel11, "jPanel11");
jPanel11.add(jScrollPane5, null);
jPanel11.add(jButton14, null);
jPanel11.add(jTextField19, null);
jPanel11.add(jLabel29, null);
jPanel11.add(jLabel30, null);
jPanel11.add(jButton15, null);
jPanel11.add(jLabel31, null);
jPanel11.add(jButton16, null);
jPanel11.add(jLabel7, null);
jScrollPane5.getViewport().add(jTextArea5, null);
jMenuBar1.add(jMenu1);
jMenuBar1.add(jMenu2);
jMenuBar1.add(jMenu3);
jMenuBar1.add(jMenu4);
jMenu1.add(jMenuItem1);
jMenu1.add(jMenuItem2);
jMenu1.add(jMenuItem3);
jMenu2.add(jMenuItem4);
jMenu2.add(jMenuItem6);
jMenu2.add(jMenuItem15);
jMenu2.add(jMenuItem16);
jMenu2.add(jMenu5);
jMenu2.add(jMenuItem18);
jMenu2.add(jMenuItem19);
jMenu3.add(jMenuItem7);
jMenu3.add(jMenuItem8);
jMenu3.add(jMenuItem9);
jMenu3.add(jMenuItem5);
jMenu3.add(jMenuItem11);
jMenu3.add(jMenuItem12);
jMenu3.add(jMenuItem13);
jMenu3.add(jMenuItem14);
jMenu4.add(jMenuItem10);
jMenu5.add(jMenuItem17);
jMenu5.add(jMenuItem20);
jMenu5.add(jMenuItem21);
jMenu5.add(jMenuItem22);
}
void jButton2_actionPerformed(ActionEvent e) {
jTextField1.setText("");
jPasswordField1.setText("");
}
void jButton1_actionPerformed(ActionEvent e) {
boolean exist=false;
String type=""+jComboBox1.getSelectedItem();
String name=jTextField1.getText();
String password=jPasswordField1.getText();
String s1="";
String s2="";
if(type.equals("超级用户"))
{
try{
String sql="select * from 超级用户 ";
st=con.createStatement();
ResultSet result=st.executeQuery(sql);
while(result.next())
{
s1=result.getString("帐号").trim();
s2=result.getString("密码").trim();
if( s1.equals(name)&&s2.equals(password) )
{
exist=true;
}
}
st.close();
}catch(SQLException ex)
{
JOptionPane.showMessageDialog(null,ex);
}
if(exist)
{
jMenuBar1.setVisible(true);
}else{
JOptionPane.showMessageDialog(null,"用户不存在!");
}
}
///////////
if(type.equals("销售系统"))
{
try{
String sql="select * from 销售系统用户 ";
st=con.createStatement();
ResultSet result=st.executeQuery(sql);
while(result.next())
{
s1=result.getString("帐号").trim();
s2=result.getString("密码").trim();
if( s1.equals(name)&&s2.equals(password) )
{
exist=true;
}
}
st.close();
}catch(SQLException ex)
{
JOptionPane.showMessageDialog(null,ex);
}
if(exist)
{
jMenuBar1.setVisible(true);
jMenu1.setVisible(false);
jMenu3.setVisible(false);
jMenu4.setVisible(false);
cardLayout1.show(this.getContentPane(),"jPanel2");
}else{
JOptionPane.showMessageDialog(null,"用户不存在!");
}
//cardLayout1.show(this.getContentPane(),"jPanel2");
}
//////////
if(type.equals("采购系统"))
{
try{
String sql="select * from 采购系统用户 ";
st=con.createStatement();
ResultSet result=st.executeQuery(sql);
while(result.next())
{
s1=result.getString("帐号").trim();
s2=result.getString("密码").trim();
if( s1.equals(name)&&s2.equals(password) )
{
exist=true;
}
}
st.close();
}catch(SQLException ex)
{
JOptionPane.showMessageDialog(null,ex);
}
if(exist)
{
jMenuBar1.setVisible(true);
jMenu1.setVisible(false);
jMenu2.setVisible(false);
jMenu4.setVisible(false);
cardLayout1.show(this.getContentPane(),"jPanel3");
}else{
JOptionPane.showMessageDialog(null,"用户不存在!");
}
}
/////////
if(type.equals("会计系统"))
{
try{
String sql="select * from 会计系统用户 ";
st=con.createStatement();
ResultSet result=st.executeQuery(sql);
while(result.next())
{
s1=result.getString("帐号").trim();
s2=result.getString("密码").trim();
if( s1.equals(name)&&s2.equals(password) )
{
exist=true;
}
}
st.close();
}catch(SQLException ex)
{
JOptionPane.showMessageDialog(null,ex);
}
if(exist)
{
jMenuBar1.setVisible(true);
jMenu1.setVisible(false);
jMenu2.setVisible(false);
jMenu3.setVisible(false);
cardLayout1.show(this.getContentPane(),"jPanel4");
}else{
JOptionPane.showMessageDialog(null,"用户不存在!");
}
}
}
void jMenuItem1_actionPerformed(ActionEvent e) {
cardLayout1.show(this.getContentPane(),"jPanel2");
}
void jMenuItem2_actionPerformed(ActionEvent e) {
cardLayout1.show(this.getContentPane(),"jPanel3");
}
void jMenuItem3_actionPerformed(ActionEvent e) {
cardLayout1.show(this.getContentPane(),"jPanel4");
}
void jMenu2_actionPerformed(ActionEvent e) {
//cardLayout1.show(this.getContentPane(),"jPanel2");
}
void jMenu3_actionPerformed(ActionEvent e) {
//cardLayout1.show(this.getContentPane(),"jPanel3");
}
void jMenu4_actionPerformed(ActionEvent e) {
//cardLayout1.show(this.getContentPane(),"jPanel4");
}
void jMenuItem4_actionPerformed(ActionEvent e) {
cardLayout1.show(this.getContentPane(),"jPanel2");
cardLayout2.show(jPanel2,"jPanel5");
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -