标记上具有语法错误,错误放置了构造
标记“}”上有语法错误,在此标记之后应为 else
这两个错误求解答如果悬赏不够我还可以再加在线等谢谢了
public void actionPerformed(ActionEvent e) {
//关 于 系 统
if(e.getSource()==jmenuitem13)
{
aboutsystem sa=new aboutsystem();
sa.setVisible(true);
}
//入库信息录入
if(e.getSource()==jmenuitem9)
{
input_info ii=new input_info();
ii.setVisible(true);
}
//出库信息录入
if(e.getSource()==jmenuitem10)
{
import_outfo io=new import_outfo();
io.setVisible(true);
}
//货物修改
if(e.getSource()==jmenuitem16)
{int i = 0;
String str=JOptionPane.showInputDialog(this,"请输入编号","提示",JOptionPane.INFORMATION_MESSAGE);
if(str.length()==0){
JOptionPane.showMessageDialog(this,"您你没有输入任何信息","提示",JOptionPane.INFORMATION_MESSAGE);
return;
}
Vector<String> vector=new Vector<String>();
vector=Function.select6_Ggno(str);
if(vector.size()==0){
JOptionPane.showMessageDialog(this,"没有您要找的货物","提示",JOptionPane.INFORMATION_MESSAGE);
return;
}
UpdateGoods ri=new UpdateGoods();
ri.jtextfield1.setText(vector.get(0).toString());
ri.jtextfield3.setText(vector.get(1).toString());
ri.jtextfield2.setText(vector.get(2).toString());
ri.jcombobox.setSelectedItem(ri.jcombobox.getItemAt(i));
ri.setVisible(true);
}
//仓库扩建
if(e.getSource()==jmenuitem14)
{
StorageKuo sk=new StorageKuo();
sk.setVisible(true);
}
//所有仓库
if(e.getSource()==jmenuitem15)
{
Vector<Vector<String>> vector=new Vector<Vector<String>>();
Vector<String> tablehead=new Vector<String>();
tablehead=Function.gettablehead4();
vector=Function.select15_Storage();
jtable=mytable.maketable(vector, tablehead);
jscrollpane2.getViewport().add(jtable);
}
//所有货物
if(e.getSource()==jmenuitem12)
{
Vector<Vector<String>> vector=new Vector<Vector<String>>();
Vector<String> tablehead=new Vector<String>();
tablehead=Function.gettablehead1();
vector=Function.select1_Stock();
jtable=mytable.maketable(vector, tablehead);
jscrollpane2.getViewport().add(jtable);
}
//供应商管理
//供应商注册
if(e.getSource()==jmenuitema3)
{
AddProvide ap=new AddProvide();
ap.setVisible(true);
}
//供应商查询
if(e.getSource()==jmenuitema5)
{
Vector<Vector<String>> vector=new Vector<Vector<String>>();
Vector<String> tablehead=new Vector<String>();
tablehead=Function.gettablehead2();
vector=Function.select1_Provide();
jtable=mytable.maketable(vector, tablehead);
jscrollpane2.getViewport().add(jtable);
}
//供应商修改
if(e.getSource()==jmenuitema4)
{
//int i = 0;
String str=JOptionPane.showInputDialog(this,"请输入编号","提示",JOptionPane.INFORMATION_MESSAGE);
if(str.length()==0){
JOptionPane.showMessageDialog(this,"您你没有输入任何信息","提示",JOptionPane.INFORMATION_MESSAGE);
return;
}
Vector<String> vector=new Vector<String>();
vector=Function.select13_Pno(str);
if(vector.size()==0){
JOptionPane.showMessageDialog(this,"没有您要找的供应商","提示",JOptionPane.INFORMATION_MESSAGE);
return;
}
UpdateProvide ri=new UpdateProvide();
ri.jtextfield2.setText(vector.get(1).toString());
ri.jtextfield3.setText(vector.get(2).toString());
ri.jtextfield4.setText(vector.get(3).toString());
ri.jtextfield5.setText(vector.get(4).toString());
ri.jtextfield1.setText(vector.get(0).toString());
//图片放在显示框中间
ri.setVisible(true);
}
//供应商注销
if(e.getSource()==jmenuitema1)
{
String str1=JOptionPane.showInputDialog(this, "请输入供应商编号","提示",JOptionPane.INFORMATION_MESSAGE);
if(str1.length()==0){
JOptionPane.showMessageDialog(this, "您没有输入任何信息","错误", JOptionPane.ERROR_MESSAGE);
return;
}
Delete.delete1_Pno(str1);
JOptionPane.showMessageDialog(this,"已经成功注销", "提示", JOptionPane.INFORMATION_MESSAGE);
}
//客户管理
//管理员替客户注册
if(e.getSource()==jmenuitema12)
{
ClienRegistl ap=new ClienRegistl();
ap.setVisible(true);
}
//客户查询
if(e.getSource()==jmenuitema9)
{
Vector<Vector<String>> vector=new Vector<Vector<String>>();
Vector<String> tablehead=new Vector<String>();
tablehead=Function.gettablehead3();
vector=Function.select1_Client();
jtable=mytable.maketable(vector, tablehead);
jscrollpane2.getViewport().add(jtable);
}
//客户修改
if(e.getSource()==jmenuitema11)
{
String str=JOptionPane.showInputDialog(this,"请输入编号","提示",JOptionPane.INFORMATION_MESSAGE);
if(str.length()==0){
JOptionPane.showMessageDialog(this,"您你没有输入任何信息","提示",JOptionPane.INFORMATION_MESSAGE);
return;
}
try {
Vector<String> vector=new Vector<String>();
vector=Function.select14_Cno(str);
if(vector.size()==0){
JOptionPane.showMessageDialog(this,"没有您要找的客户","提示",JOptionPane.INFORMATION_MESSAGE);
return;
}
UpdateClient ri=new UpdateClient();
ri.jtextfield1.setText(vector.get(0).toString().trim());
ri.jtextfield2.setText(vector.get(1).toString().trim());
ri.jtextfield3.setText(vector.get(2).toString().trim());
ri.jtextfield4.setText(vector.get(3).toString().trim());
//ImageIcon icon=new ImageIcon(vector.get(4).getBytes());
//ri.jlabel1.setIcon(icon);
//ri.jlabel1.setHorizontalAlignment(SwingConstants.CENTER); //图片放在显示框中间
ri.setVisible(true);
} catch (Exception e2) {
System.out.println("yichang:vector.size()");
System.out.println("\nstr="+str);
}
}
//客户注销
if(e.getSource()==jmenuitema10)
{
String str1=JOptionPane.showInputDialog(this, "请输入客户编号","提示",JOptionPane.INFORMATION_MESSAGE);
if(str1.length()==0){
JOptionPane.showMessageDialog(this, "您没有输入任何信息","错误", JOptionPane.ERROR_MESSAGE);
return;
}
Delete.delete2_Cno(str1);
JOptionPane.showMessageDialog(this,"已经成功注销", "提示", JOptionPane.INFORMATION_MESSAGE);
}
//按货物编号查询
if(e.getSource()==jmenuitem5)
{
String str1=JOptionPane.showInputDialog(this, "请输入货物编号","提示",JOptionPane.INFORMATION_MESSAGE);
if(str1.length()==0){
JOptionPane.showMessageDialog(this, "您没有输入任何信息","错误", JOptionPane.ERROR_MESSAGE);
return;
}
Vector<Vector<String>> vector=new Vector<Vector<String>>();
Vector<String> tablehead=new Vector<String>();
tablehead=Function.gettablehead1();
vector=Function.select7_Gno(str1);
if(vector.size()==0){
JOptionPane.showMessageDialog(this,"对不起,货物编号不存在", "提示", JOptionPane.INFORMATION_MESSAGE);
return;
}
Vector<String> vector19=new Vector<String>();
while(vector.size()<40){
vector.add(vector19);
}
jtable=mytable.maketable(vector,tablehead);
jscrollpane2.getViewport().add(jtable);
}
//按货物名称查询
if(e.getSource()==jmenuitem6)
{
String str1=JOptionPane.showInputDialog(this, "请输入货物名称","提示",JOptionPane.INFORMATION_MESSAGE);
if(str1.length()==0){
JOptionPane.showMessageDialog(this, "您没有输入任何信息","错误", JOptionPane.ERROR_MESSAGE);
return;
}
Vector<Vector<String>> vector=new Vector<Vector<String>>();
Vector<String> tablehead=new Vector<String>();
tablehead=Function.gettablehead1();
vector=Function.select5_Gname(str1);
if(vector.size()==0){
JOptionPane.showMessageDialog(this,"对不起没有您需要的货物", "提示", JOptionPane.INFORMATION_MESSAGE);
return;
}
Vector<String> vector19=new Vector<String>();
while(vector.size()<40){
vector.add(vector19);
}
jtable=mytable.maketable(vector,tablehead);
jscrollpane2.getViewport().add(jtable);
}
//按仓库查询
if(e.getSource()==jmenuitem8)
{
String str1=JOptionPane.showInputDialog(this, "请输入仓库编号","提示",JOptionPane.INFORMATION_MESSAGE);
if(str1.length()==0){
JOptionPane.showMessageDialog(this, "您没有输入任何信息","错误", JOptionPane.ERROR_MESSAGE);
return;
}
Vector<Vector<String>> vector=new Vector<Vector<String>>();
Vector<String> tablehead=new Vector<String>();
tablehead=Function.gettablehead1();
vector=Function.select8_Sno(str1);
if(vector.size()==0){
JOptionPane.showMessageDialog(this,"此仓库号不存在,无法查看仓库库存", "提示", JOptionPane.INFORMATION_MESSAGE);
return;
}
Vector<String> vector19=new Vector<String>();
while(vector.size()<40){
vector.add(vector19);
}
jtable=mytable.maketable(vector,tablehead);
jscrollpane2.getViewport().add(jtable);
}