⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 frameproductstoryinformation.java~26~

📁 若已安装Jbuilder X
💻 JAVA~26~
📖 第 1 页 / 共 2 页
字号:
package Manager;

import javax.swing.*;
import com.borland.jbcl.layout.*;
import java.awt.*;
import java.sql.*;
import java.awt.event.*;
//import java.util.*;
/**
 * <p>Title: </p>
 * <p>Description: </p>
 * <p>Copyright: Copyright (c) 2003</p>
 * <p>Company: </p>
 * @author not attributable
 * @version 1.0
 */

public class FrameProductStoryInformation extends JFrame {
  ResultSet rs;    //resultset
  String sql;
 private DBManager db =new DBManager();

  XYLayout xYLayout1 = new XYLayout();
  JLabel jLabel8 = new JLabel();
  JLabel jLabel4 = new JLabel();
  JTextField jText44 = new JTextField();
  JTextField jText41 = new JTextField();
  JLabel jLabel12 = new JLabel();
  JLabel jLabel1 = new JLabel();
  JLabel jLabel13 = new JLabel();
  JLabel jLabel3 = new JLabel();
  JTextField jText43 = new JTextField();
  JButton jButtonnext = new JButton();
  JTextField jText37 = new JTextField();
  JLabel jLabel14 = new JLabel();
  JTextField jTextkuanxing = new JTextField();
  JLabel jLabel9 = new JLabel();
  JComboBox jCombocolor = new JComboBox();
  JButton jButtonSearch = new JButton();
  JLabel jText37ee = new JLabel();
  JTextField jText36 = new JTextField();
  JLabel jLabel16 = new JLabel();
  JLabel jLabel11 = new JLabel();
  JTextField jText40 = new JTextField();
  JButton jButtonpre = new JButton();
  JButton jButtonlast = new JButton();
  JButton jButtonupdate = new JButton();
  JPanel jPanel1 = new JPanel();
  JTextField jText42 = new JTextField();
  JButton jButtonexit = new JButton();
  JButton jButtondelete = new JButton();
  JTextField jText38 = new JTextField();
  JButton jButtonfirst = new JButton();
  JLabel jLabel6 = new JLabel();
  XYLayout xYLayout2 = new XYLayout();
  JLabel jLabel10 = new JLabel();
  JTextField jText39 = new JTextField();
  JButton jButtonShow = new JButton();

  public FrameProductStoryInformation() {
    try {
      jbInit();
    }
    catch(Exception e) {
      e.printStackTrace();
    }
  }
  public static void main(String[] args) {
    FrameProductStoryInformation frameProductStoryInformation = new FrameProductStoryInformation();
  }
  private void jbInit() throws Exception {
    jPanel1.setLayout(xYLayout2);
    jPanel1.setToolTipText("");
    jPanel1.setBorder(BorderFactory.createLineBorder(Color.black));
    jButtonupdate.setFont(new java.awt.Font("Dialog", 0, 16));
    jButtonupdate.setText("update");
    jButtonupdate.addMouseListener(new FrameProductStoryInformation_jButtonupdate_mouseAdapter(this));
    jButtonlast.setText("last");
    jButtonlast.addMouseListener(new FrameProductStoryInformation_jButtonlast_mouseAdapter(this));
    jButtonlast.setFont(new java.awt.Font("Dialog", 0, 16));
    jButtonpre.setFont(new java.awt.Font("Dialog", 0, 16));
     jButtonpre.setText("pre");
    jButtonpre.addMouseListener(new FrameProductStoryInformation_jButtonpre_mouseAdapter(this));
    jText40.setText("");
    jLabel11.setText("39");
    jLabel11.setFont(new java.awt.Font("Dialog", 0, 16));
    jLabel16.setFont(new java.awt.Font("Dialog", 0, 16));
    jLabel16.setText("kuanxing ");
    jText36.setText("");
    jText37ee.setText("37");
    jText37ee.setFont(new java.awt.Font("Dialog", 0, 16));
    jButtonSearch.setFont(new java.awt.Font("Dialog", 0, 16));
     jButtonSearch.setText("search");
    jButtonSearch.addMouseListener(new FrameProductStoryInformation_jButtonSearch_mouseAdapter(this));
    jCombocolor.setFont(new java.awt.Font("Dialog", 0, 16));
    jLabel9.setText("40");
    jLabel9.setFont(new java.awt.Font("Dialog", 0, 16));
    jTextkuanxing.setText("");
    jLabel14.setText("44");
    jLabel14.setFont(new java.awt.Font("Dialog", 0, 16));
    jText37.setText("");
    jButtonnext.setFont(new java.awt.Font("Dialog", 0, 16));
     jButtonnext.setText("next");
    jButtonnext.addMouseListener(new FrameProductStoryInformation_jButtonnext_mouseAdapter(this));
    jLabel3.setText("color");
    jLabel3.setFont(new java.awt.Font("Dialog", 0, 16));
    jLabel13.setText("43");
    jLabel13.setFont(new java.awt.Font("Dialog", 0, 16));
    jLabel1.setText(" ");
    jLabel1.setFont(new java.awt.Font("Dialog", 0, 16));
    jLabel12.setText("42");
    jLabel12.setFont(new java.awt.Font("Dialog", 0, 16));
    jText41.setText("");
    jText44.setText("");
    jLabel4.setFont(new java.awt.Font("Dialog", 0, 16));
    jLabel4.setText("");
    jLabel8.setText("38");
    jLabel8.setFont(new java.awt.Font("Dialog", 0, 16));
    this.getContentPane().setLayout(xYLayout1);
    jCombocolor.addItem("");
    jCombocolor.addItem("red");
    jCombocolor.addItem("black");
    jCombocolor.addItem("blue");
    jText42.setText("");
    jButtonexit.setFont(new java.awt.Font("Dialog", 0, 16));
    jButtonexit.setText("exit");
    jButtonexit.addMouseListener(new FrameProductStoryInformation_jButtonexit_mouseAdapter(this));
      jButtondelete.setFont(new java.awt.Font("Dialog", 0, 16));
    jButtondelete.setText("delete");
    jButtondelete.addMouseListener(new FrameProductStoryInformation_jButtondelete_mouseAdapter(this));
     jText38.setText("");
    jButtonfirst.setText("first");
    jButtonfirst.addMouseListener(new FrameProductStoryInformation_jButtonfirst_mouseAdapter(this));
      jButtonfirst.setFont(new java.awt.Font("Dialog", 0, 16));
    jLabel6.setFont(new java.awt.Font("Dialog", 0, 16));
    jLabel6.setText("36");
    jLabel10.setFont(new java.awt.Font("Dialog", 0, 16));
    jLabel10.setText("41");
    jText39.setText("");
    xYLayout1.setWidth(658);
    xYLayout1.setHeight(371);
    jButtonShow.setFont(new java.awt.Font("Dialog", 0, 16));
    jButtonShow.setText("show Graphic");
    jButtonShow.addMouseListener(new FrameProductStoryInformation_jButtonShow_mouseAdapter(this));
   jPanel1.add(jLabel11, new XYConstraints(187, 15, 40, 25));
    jPanel1.add(jLabel13, new XYConstraints(407, 64, 35, 22));
    jPanel1.add(jLabel12, new XYConstraints(410, 20, 35, 21));
    jPanel1.add(jLabel14, new XYConstraints(406, 113, 41, 20));
    jPanel1.add(jLabel6, new XYConstraints(14, 18, 34, 20));
    jPanel1.add(jText37ee, new XYConstraints(13, 61, 41, 22));
    jPanel1.add(jLabel8, new XYConstraints(13, 120, 36, 26));
    jPanel1.add(jLabel9, new XYConstraints(183, 70, 35, -1));
    jPanel1.add(jLabel10, new XYConstraints(185, 122, 34, 21));
    jPanel1.add(jText36, new XYConstraints(62, 17, 90, 27));
    jPanel1.add(jText37, new XYConstraints(63, 62, 87, 26));
    jPanel1.add(jText38, new XYConstraints(64, 120, 85, -1));
    jPanel1.add(jText39, new XYConstraints(251, 20, 104, 23));
    jPanel1.add(jText40, new XYConstraints(251, 67, 108, 25));
    jPanel1.add(jText41, new XYConstraints(252, 122, 109, 23));
    jPanel1.add(jText42, new XYConstraints(462, 23, 104, 25));
    jPanel1.add(jText43, new XYConstraints(462, 66, 106, 24));
    jPanel1.add(jText44, new XYConstraints(462, 112, 108, 21));
    this.getContentPane().add(jButtonShow,   new XYConstraints(486, 55, 150, 29));
    this.getContentPane().add(jButtonSearch, new XYConstraints(485, 17, 91, 29));
    this.getContentPane().add(jButtonpre, new XYConstraints(116, 282, 82, 26));
    this.getContentPane().add(jButtonexit,     new XYConstraints(550, 282, 70, 28));
    this.getContentPane().add(jButtondelete,     new XYConstraints(463, 282, 86, 28));
    this.getContentPane().add(jButtonfirst,     new XYConstraints(29, 281, 86, 26));
    this.getContentPane().add(jButtonnext, new XYConstraints(199, 282, 89, 26));
    this.getContentPane().add(jButtonlast, new XYConstraints(288, 282, 81, 27));
    this.getContentPane().add(jButtonupdate, new XYConstraints(369, 282, 94, 27));
    this.getContentPane().add(jPanel1, new XYConstraints(25, 90, 613, 172));
    this.getContentPane().add(jLabel1, new XYConstraints(32, 17, 44, 32));
    this.getContentPane().add(jLabel4,  new XYConstraints(124, 138, 239, 28));
    this.getContentPane().add(jLabel3,  new XYConstraints(258, 19, 50, 27));
    this.getContentPane().add(jTextkuanxing,  new XYConstraints(118, 23, 80, -1));
    this.getContentPane().add(jCombocolor,  new XYConstraints(352, 19, 80, 24));
    this.getContentPane().add(jLabel16,  new XYConstraints(25, 20, 83, -1));
  }
  void showResult(){
    try {
         jTextkuanxing.setText(rs.getString("kuanxing") );
         jCombocolor.setSelectedItem(rs.getString("color") ) ;

         jText36.setText(rs.getString("36") );
         jText37.setText(rs.getString("37") );
         jText38.setText(rs.getString("38") );
         jText39.setText(rs.getString("39") );
         jText40.setText(rs.getString("40") );
         jText41.setText(rs.getString("41") );
         jText42.setText(rs.getString("42") );
         jText43.setText(rs.getString("43") );
         jText44.setText(rs.getString("44") );

       }
       catch (SQLException ex) {
         System.out.println(ex.toString() ) ;
       }


  }

void jButtonSearch_mouseClicked(MouseEvent e) {
    boolean  isfirst =true;
    sql="select * from ProductStore ";
// JOptionPane.showMessageDialog(null,jCombocolor.getSelectedItem().toString().trim() );
     if (jTextkuanxing.getText().trim().length() ==0)
     {}
     else
     {
        sql=sql+"  where  kuanxing='"+jTextkuanxing.getText().trim()+"'";
        isfirst=false;
     }
    if (jCombocolor.getSelectedItem().toString().trim() .length() ==0)
    {}
    else
    {
      if (isfirst)
      sql=sql+" where color='"+jCombocolor.getSelectedItem().toString().trim() +"'";
      else
       sql=sql+" and color='"+jCombocolor.getSelectedItem().toString().trim() +"'";
    }
   // JOptionPane.showMessageDialog(null,sql );
            rs =db.getResult(sql);
             try {
               if(! rs.equals(null) )
               {  rs.next();

⌨️ 快捷键说明

复制代码 Ctrl + C
搜索代码 Ctrl + F
全屏模式 F11
切换主题 Ctrl + Shift + D
显示快捷键 ?
增大字号 Ctrl + =
减小字号 Ctrl + -