Võ Văn Hải's blog

Chỉ có một điều tuyệt đối đó là mọi thứ đều tương đối…

29 Responses to “GUI application”

  1. mitsu said

    Em có tạo 1 class với các nút bấm, mục đích của em là khi bấm 1 nút tương ứng thì mình sẽ thay đổi màu nền của 1 frame thuốc lớp khác. Nhưng em ko để thao tác với các đối tượng khác lớp được. Có cách nào để từ 1 lớp này có thể thao tác với lớp khác ko thầy.

  2. YinYang said

    Bạn chỉ cần truyền nó vào construc như 1 tham số, khi đó đối tượng sẽ được tham chiếu đến và sử dụng bình thường

  3. chiencong said

    chào thầy!!!
    thầy ơi, thầy có thề cho em 1 đoạn code mà làm hiển thị giờ, phút, giây nó chạy lên 1 cái Jframe chính được không dạ.
    còn việc hiện thị ngày giờ thì em biết rồi ạ.
    Thân thầy

  4. vovanhai said

    Đây:
    package vovanhai.worpress.com;

    import java.awt.Font;
    import java.awt.event.ActionEvent;
    import java.awt.event.ActionListener;
    import java.util.Calendar;

    import javax.swing.JFrame;
    import javax.swing.JLabel;
    import javax.swing.Timer;

    public class MyClock extends JFrame implements ActionListener{
    private static final long serialVersionUID = 194979931331258758L;
    private JLabel lblDisplay;
    private Timer timer;
    public MyClock() {
    setTitle(“My Clock”);
    setDefaultCloseOperation(EXIT_ON_CLOSE);
    setSize(400,250);
    this.add(lblDisplay=new JLabel(“”,JLabel.CENTER));
    lblDisplay.setFont(new Font(“Arial”,Font.BOLD,40));
    timer=new Timer(1000,this);
    timer.start();
    }
    @Override
    public void actionPerformed(ActionEvent e) {
    if(e.getSource().equals(timer)) {
    Calendar cal=Calendar.getInstance();
    String s=cal.getTime().toString();
    lblDisplay.setText(s);
    }
    }
    public static void main(String[] args) {
    new MyClock().setVisible(true);
    }
    }

  5. tuankiet said

    chào thầy.
    em có thể thay đổi cái title bar trong cái JFrame được ko vậy.
    tại thấy cái biểu tượng càfephim thấy buồn ngủ quá.
    thân thầy.hihihi

  6. nguyenthanhcong said

    THẦY ƠI. VẬY EM MUỐN HIỆN NGÀY THÁNG THÌ SAO THẦY.
    THÂN THẦY.

  7. tuankiet said

    thầy ơi!!
    cho em hỏi .có 1 cái jframe trên đó em có 4 cái nút a,b,c,d.
    giờ thầy có thể chỉ cho em làm sao mà em nhấn vô 1 trong 4 nút thì nó thay đổi cái Jpanel theo ý mình dc ko ạ.
    nếu em muốn show như vậy thì em phải extends hay implement,và xử lý event như nào vậy thầy.
    thầy có thể cho em 1 code nhỏ nhỏ để thay đổi Jpanel dc ko thầy.
    Em cám ơn thầy .
    mong dc thư hồi âm của thầy .

  8. nguyenthanhcong said

    thầy ơi!!!
    em viết chương trình máy tính.chương trình không bị lổi nhưng mà khi em dug thì nó báo lỗi là:
    Exception in thread “AWT-EventQueue-0” java.lang.IllegalArgumentException: adding a window to a container
    at java.awt.Container.addImpl(Unknown Source)
    at java.awt.Container.add(Unknown Source)
    at javax.swing.JFrame.addImpl(Unknown Source)
    at java.awt.Container.add(Unknown Source)
    at MyCacular.CacularFrame.(CacularFrame.java:12)
    at MyCacular.Test_Cacular$1.run(Test_Cacular.java:18)
    at java.awt.event.InvocationEvent.dispatch(Unknown Source)
    at java.awt.EventQueue.dispatchEvent(Unknown Source)
    at java.awt.EventDispatchThread.pumpOneEventForFilters(Unknown Source)
    at java.awt.EventDispatchThread.pumpEventsForFilter(Unknown Source)
    at java.awt.EventDispatchThread.pumpEventsForHierarchy(Unknown Source)
    at java.awt.EventDispatchThread.pumpEvents(Unknown Source)
    at java.awt.EventDispatchThread.pumpEvents(Unknown Source)
    at java.awt.EventDispatchThread.run(Unknown Source)
    ——————
    đoạn code của em là:
    package MyCacular;

    import java.awt.EventQueue;

    import javax.swing.JFrame;

    public class Test_Cacular {

    /**
    * @param args
    */
    public static void main(String[] args)
    {
    EventQueue.invokeLater(new Runnable()
    {
    public void run()
    {
    CacularFrame Frame=new CacularFrame();
    Frame.setVisible(true);
    Frame.setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE);
    }
    });
    }
    }
    ——————
    package MyCacular;

    import javax.swing.JFrame;

    public class CacularFrame extends JFrame{
    private static final long serialVersionUID = 1L;
    public CacularFrame()
    {
    setTitle(“MAY TINH MINI”);
    setSize(400,400);
    CacularPanel panel=new CacularPanel();
    add(panel);
    pack();
    }
    }
    —————————
    package MyCacular;

    import java.awt.BorderLayout;
    import java.awt.GridLayout;
    import java.awt.event.ActionEvent;
    import java.awt.event.ActionListener;
    import javax.swing.JButton;
    import javax.swing.JFrame;
    import javax.swing.JPanel;

    public class CacularPanel extends JFrame{
    private JButton display;
    private JPanel panel;
    private double result;
    private String lastCommand;
    private boolean start;
    private static final long serialVersionUID = 1L;
    public CacularPanel()
    {
    setLayout(new BorderLayout());
    result =0;
    lastCommand =”=”;
    start=true;
    //add de no hien thi:
    display=new JButton(“0”);
    display.setEnabled(false);
    add(display,BorderLayout.NORTH);

    ActionListener insert=new InsertAction();
    ActionListener command=new CommandAction();

    //add button tren 4×4 gird:
    panel=new JPanel();
    panel.setLayout(new GridLayout(5,5));

    addButton(“(“,insert);
    addButton(“)”,insert);
    addButton(“sqrt”,insert);
    addButton(“fresh”,command);

    addButton(“7”,insert);
    addButton(“8”,insert);
    addButton(“9”,insert);
    addButton(“/”,command);

    addButton(“4”,insert);
    addButton(“5”,insert);
    addButton(“6”,insert);
    addButton(“*”,command);

    addButton(“1”,insert);
    addButton(“2”,insert);
    addButton(“3”,insert);
    addButton(“-“,command);

    addButton(“0”,insert);
    addButton(“.”,insert);
    addButton(“=”,insert);
    addButton(“+”,command);

    add(panel,BorderLayout.CENTER);
    }
    private void addButton(String label,ActionListener listener)
    {
    JButton button=new JButton(label);
    button.addActionListener(listener);
    panel.add(button);
    }
    private class InsertAction implements ActionListener
    {

    @Override
    public void actionPerformed(ActionEvent event)
    {
    String input=event.getActionCommand();
    if(start)
    {
    display.setText(“”);
    start=false;
    }
    display.setText(display.getText()+input);
    }
    }
    private class CommandAction implements ActionListener
    {

    @Override
    public void actionPerformed(ActionEvent event)
    {
    String command =event.getActionCommand();
    if(start)
    {
    if(command.equals(“-“))
    {
    display.setText(command);
    start=false;
    }
    else lastCommand=command;
    }
    else
    {
    calculate(Double.parseDouble(display.getText()));
    lastCommand=command;
    start=true;
    }
    }
    }
    public void calculate(double x)
    {
    if(lastCommand.equals(“+”)) result +=x;
    else if(lastCommand.equals(“-“)) result -=x;
    else if(lastCommand.equals(“*”)) result *=x;
    else if(lastCommand.equals(“/”)) result /=x;
    else if(lastCommand.equals(“=”)) result =x;
    //else if(lastCommand.equals(“sqrt”)) result =x;
    else if(lastCommand.equals(“fresh”)) result =0;
    display.setText(“”+result);
    }
    }

  9. vovanhai said

    Bạn đổi khai báo:
    public class CacularPanel extends JPanel
    thay vì public class CacularPanel extends JFrame
    Bởi làm như bạn có nghĩa là đưa 1 JFrame vào 1 JFrame.
    Chúc mừng năm mới!

  10. vovanhai said

    Thay đổi icon trên title bar:
    java.awt.Image img=this.getToolkit().createImage(“img/attention.gif”);
    this.setIconImage(img);

  11. vovanhai said


    thầy ơi!!
    cho em hỏi .có 1 cái jframe trên đó em có 4 cái nút a,b,c,d.
    giờ thầy có thể chỉ cho em làm sao mà em nhấn vô 1 trong 4 nút thì nó thay đổi cái Jpanel theo ý mình dc ko ạ.
    nếu em muốn show như vậy thì em phải extends hay implement,và xử lý event như nào vậy thầy.
    thầy có thể cho em 1 code nhỏ nhỏ để thay đổi Jpanel dc ko thầy.
    Em cám ơn thầy .
    mong dc thư hồi âm của thầy .

    Câu hỏi của em chưa rõ ràng. Em muốn thay đổi JPanel là thay đổi thế nào? Em nói chi tiết điều em cần nhé!

  12. tuankiet said

    ví dụ em có 1 cái JFrame chính .
    trên cái JFrame đó .em có 4 nút. nó nằm dọc theo bên góc trái FRAME.
    khi em nhấn vô 1 trong 4 nút thì cái Jpanel thay đổi.
    4 nút là làm thay đổi 4 lần đó thầy.
    không biết thầy hiểu ý em chưa?
    thân thầy.

  13. vovanhai said

    Để làm được như thế, em viết 4 lớp và các lớp này extends từ JPanel.
    Trên frame chính, em tạo 2 panel, 1 cái chứa 4 nút nằm bên trái, 1 cái tên pcen nằm giữa. Khi nhấn 1 nút, em cứ add cái panel mà em muốn vào pcen là ngon lành. Nhưng nhớ trước khi add thì phải remove tất cả component ra khỏi pcen đã nhé. Chcu1 vui

  14. tuankiet said

    Thay đổi icon trên title bar:
    java.awt.Image img=this.getToolkit().createImage(”img/attention.gif”);
    this.setIconImage(img);
    ———
    thầy ơi. em lấy đoạn code này rồi mà sao ko thay đổi dc cái title bar vậy thầy.
    em đưa hình vào trong Bin , và trong scr trong phần bài tập mà vẫn ko dc . thầy có thể giải thích em cái à
    thân thầy

  15. ditimniemvui said

    em tạo 1 cái JFrame login USE,PASS.!!!
    làm sao mà nó liên kết giống dc như cái phần mềm điểm danh của thầy mà thầy đăng nhập dc đó vậy thầy.
    hihihihi!!!!
    thầy có thể giải thích sơ dùm em cái thưa thấy.
    chúc mừng năm mới .

  16. ditimniemvui said

    import java.awt.BorderLayout;
    import java.awt.GridBagConstraints;
    import java.awt.GridBagLayout;
    import java.awt.GridLayout;
    import java.awt.event.ActionEvent;
    import java.awt.event.ActionListener;

    import javax.swing.BorderFactory;
    import javax.swing.JButton;
    import javax.swing.JFrame;
    import javax.swing.JLabel;
    import javax.swing.JPanel;
    import javax.swing.JPasswordField;
    import javax.swing.JTextField;
    import javax.swing.border.Border;

    public class fLogin extends JFrame implements ActionListener{

    /**
    *
    */
    private static final long serialVersionUID = 1L;
    java.awt.Container con;
    GridBagLayout gbl;
    GridBagConstraints gbc;
    BorderLayout bdLogin;
    GridLayout gl;
    JPanel pnLogin,pnEnd;
    JTextField txtUser;
    JPasswordField txtPass;
    JLabel lblUser,lblPass;
    JButton btnLogin,btnCancel;
    public fLogin()
    {
    super();
    con = getContentPane();
    gbl = new GridBagLayout();
    gbc = new GridBagConstraints();
    gl = new GridLayout(1,2);
    Border border = BorderFactory.createTitledBorder(“Form Login”);
    bdLogin = new BorderLayout();
    pnLogin = new JPanel();
    pnEnd = new JPanel();
    txtUser = new JTextField(12);
    txtPass = new JPasswordField(12);
    txtPass.setEchoChar(‘*’);
    lblUser = new JLabel(“UserName”);
    lblPass = new JLabel(“Password”);
    btnLogin = new JButton(“Login”);
    btnLogin.addActionListener(this);
    btnCancel = new JButton(“Cancel”);
    btnCancel.addActionListener(this);
    pnLogin.setLayout(gbl);
    pnLogin.setBorder(border);
    gbc.gridx = 0;
    gbc.gridy = 0;
    pnLogin.add(lblUser,gbc);
    gbc.gridx = 1;
    pnLogin.add(txtUser,gbc);
    gbc.gridx = 0;
    gbc.gridy = 1;
    pnLogin.add(lblPass,gbc);
    gbc.gridx = 1;
    pnLogin.add(txtPass,gbc);
    pnEnd.setLayout(gl);
    pnEnd.add(btnLogin);
    pnEnd.add(btnCancel);
    con.setLayout(bdLogin);
    con.add(pnLogin,BorderLayout.CENTER);
    con.add(pnEnd,BorderLayout.SOUTH);
    pack();
    setVisible(true);
    setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE);
    }
    public void actionPerformed(ActionEvent e)
    {
    if (e.getSource()==btnCancel)
    {
    System.exit(0);
    }
    if(e.getSource()==btnLogin)
    {
    txtUser.setText(“chua lien ket co so du lieu”);
    }
    }
    public static void main(String[] args)
    {
    new fLogin().setVisible(true);
    }
    }

  17. vovanhai said

    EM phải học cách connect database đã. Nếu em là sv của tôi thì học kỳ tới chúng ta sẽ học. Chúc vui!

  18. nguyenviettram said

    happy new year 2009.
    chúc thầy có 1 năm mới vui khỏe, thành công.
    nhất là có nhiều tiền nha thầy.
    hihihih.

  19. vovanhai said

    nếu trong eclipse, em phải tạo 1 thư mục img trong project(nhấn chuột phải lên project, chọn new->Folder) rồi copy hình vào đó.

  20. Mai Quyen said

    Em chào thầy,

    Em mới học java và em có một bài tập muốn nhờ thầy giúp đỡ. Bài tâp của em như sau ạ:

    Cho một tập dữ liệu file dạng txt
    ví dụ :
    Soda;1.2; 1.3; 1.5; 1.4; 1.5; 1.7; 1.8; 1.2; 1.3; 1.1; 1.6; 1.2
    pome;2.0; 2.3; 2.4; 2.2; 2.5; 2.1; 2.6; 2.5; 2.9; 2.7; 3.0; 2.8
    evian;0.8; 0.5; 0.7; 0.6; 0.5; 0.8; 0.7; 0.6; 0.5; 0.7; 0.9; 0.7

    Mỗi dong của file gồm tên của đồ uống và giá của chúng trong từng tháng (tháng 1- tháng 12)
    1,Yêu cầu đọc dữ liệu và tính trung bình của giá của từng loại đồ uống trong vòng 6 tháng đầu và 6 tháng cuối
    2, Sửa đổi chương trình để đưa ra đồ thị của từng loại sản phẩm trong 12 tháng và mỗi sản phẩm sẽ có mầu khác nhau và có ghi chú trong đồ thị về tên của sản phẩm.

    Thưa thầy, tính giá trị trung bình của từng sản phẩm trong 6 tháng đầu em đã viết. tuy nhiên phần sau em chưa nghĩ ra phải làm để sửa chương trình rồi đưa ra đồ thị. Em mong thầy hướng dẫn giúp ạ. Em cảm ơn thầy nhiều!

    Đầy là chương trình tính giá trị trung bình của từng sản phẩm trong 6 tháng đâu a;

    import java.io.*;
    public class exercice33 {
    public static void main(String[]args)throws java.io.IOException, java.io.FileNotFoundException{
    String ligne;
    String []Tab;
    FileReader file= new FileReader(“C:\\Users\\Pham mai quyen\\Documents\\NetBeansProjects\\AtalierInformatique\\src\\Produit1.txt”);
    BufferedReader in=new BufferedReader(file);
    do{
    ligne= in.readLine();
    if(ligne!=null){
    Tab=ligne.split(“;”);
    double m=0;
    for (int i=1;i<=6;i++){
    System.out.print(Tab[i]+" ");
    m +=Double.parseDouble(Tab[i])/6;
    }
    System.out.println();
    System.out.println("Moyenne de prix de "+Tab[0]+" dans 6 premiers mois est: " + m);
    }
    }
    while (ligne!=null);
    }

    }

  21. mai said

    ///////////////////////////Hàm connection import java.sql.*; import java.sql.Connection; import java.sql.DriverManager; import java.sql.ResultSet; import java.sql.SQLException; import javax.swing.JOptionPane; /** * * @author Son */ public class MyConnection { public Connection conn;// public Statement stmt;// Coi chung lon voi Statement trong goi java.beans. ///////////////constructor public MyConnection(String user, String pass) throws SQLException{ //ko can schema vi trong oracle userschema try{ Class.forName(“oracle.jdbc.driver.OracleDriver”); conn = DriverManager.getConnection(“jdbc:oracle:thin:@localhost:1521:XE”, user, pass); stmt = (Statement) conn.createStatement(); }catch(Exception e){ JOptionPane.showMessageDialog(null, e.getMessage()); } //Lam viec voi open csdl thi phai finally bien luan de close tat ca nhung cai da open //Neu close sot thi se gap rac roi day. } //////////////transaction methods public void commit() throws SQLException { conn.commit(); } public void rollback() throws SQLException { conn.rollback(); } public void setAutoCommit(boolean autoCommit) throws SQLException { conn.setAutoCommit(autoCommit); } //////////////////////thao-tac-du-lieu methods //sql tinh thi myConn execute truc tiep, vi trong constructor da co doi tuong Statement san rui //Con sql dong va thu tuc thi phai chinh doi tuong PrepareStatement va CallableStatement //execute moi duoc. public ResultSet executeQuery(String sql) throws SQLException{ return stmt.executeQuery(sql); } public int executeUpdate(String sql) throws SQLException{ return stmt.executeUpdate(sql); } //sql dong thi trai qua 3 buoc: myConn.methodprepareStatement(sql)—>roi phai dung 1 bien //don nhan 1 doi tuong PreparedStatement tra ve, lay bien.set, cuoi cung bien.execute public PreparedStatement prepareStatement(String sql) throws SQLException{ return conn.prepareStatement(sql); } //Goi thu tuc trai qua 4 buoc: truoc tien dung 1 bien don nhan doi tuong CallableStatement, //roi bien.set or bien.registerOutParameter, roi bien.execute, roi bien.getXXX de lay //gia tri xuat cua thu tuc. public CallableStatement prepareCall(String sql) throws SQLException{ return conn.prepareCall(sql); } //////////////////////Dong ket noi public void close(){ try{ if(stmt != null) stmt.close(); if(conn != null) conn.close(); }catch(Exception e){ JOptionPane.showMessageDialog(null, e.getMessage()); } } } ///////////////////////////////////Hàm MucHD /* * To change this template, choose Tools | Templates * and open the template in the editor. */ package BO; import javax.swing.table.DefaultTableModel; import java.sql.*; import java.util.Vector; import javax.swing.JTable; import Connection.MyConnection; import javax.swing.JOptionPane; /** * * @author mai */ public class MucHD { private String user=”csdl1″; private String pass=”123″; public void AllMucHD(JTable jTbale1,DefaultTableModel model) throws SQLException{ Vector rowHeader = new Vector (); rowHeader.add (“mã mục HD”); rowHeader.add (“tên mục HD”); rowHeader.add (“điểm tối đa”); rowHeader.add (“đơn vị”); rowHeader.add (“Loại mục HD”); rowHeader.add (“Loại muc con HD”); model = new DefaultTableModel(rowHeader,0); MyConnection con=new MyConnection(user,pass); String query=”SELECT * FROM section_activities order by sectionsid asc”; ResultSet rs= con.executeQuery(query); Vector rowData; //lặp hiển thị từng record lên JTable if (rs != null) while (rs.next()){ rowData = new Vector() ; rowData.add (rs.getString(“Sectionsid”)); rowData.add (rs.getString(“sectionsname”)); rowData.add (rs.getString(“maxmark”)); rowData.add(rs.getString(“article”)); rowData.add(rs.getString(“typesecid”)); rowData.add(rs.getString(“subsectionid”)); model.addRow(rowData) ; } jTbale1.setModel(model); con.conn.close(); } public void ThemMucHD(String MaMuc,String TenMuc,String Diem, String DonVi,String LoaiMuc,String MucCon)throws SQLException{ try{ MyConnection con=new MyConnection(user,pass); String query = “insert into section_ACTIVITIES(SECTIONSID, SECTIONSNAME, MAXMARK, ARTICLE, TYPESECID,subsectionid)” + ” values(‘”+MaMuc+”‘,\'”+TenMuc+”‘,\'”+Diem+”‘,\'”+DonVi+”‘,\'”+LoaiMuc+”‘,\'”+MucCon+”‘)”; System.out.println(query); con.executeQuery(query); // String[] data={ MaMuc,TenMuc, Diem, DonVi, LoaiMuc}; //model.addRow(data); //jTbale1.setModel(model); con.conn.close(); } catch(Exception ex){ System.out.println(“Error : “+ex); } } } /////////////////FormMucHD /* * To change this template, choose Tools | Templates * and open the template in the editor. */ /* * dsMucHD.java * * Created on Mar 31, 2011, 8:36:09 PM */ package Form.resources; import java.sql.*; import javax.swing.table.DefaultTableModel; import BO.*; import javax.swing.JOptionPane; /** * * @author mai */ public class dsMucHD extends javax.swing.JFrame { MucHD muchd=new MucHD(); /** Creates new form dsMucHD */ public dsMucHD() throws SQLException{ initComponents(); muchd.AllMucHD(jTableSectionsActivities, model); } /** This method is called from within the constructor to * initialize the form. * WARNING: Do NOT modify this code. The content of this method is * always regenerated by the Form Editor. */ @SuppressWarnings(“unchecked”) // private void initComponents() { jLabel1 = new javax.swing.JLabel(); txtSectionsName = new javax.swing.JTextField(); jLabel2 = new javax.swing.JLabel(); txtSectionsID = new javax.swing.JTextField(); jLabel3 = new javax.swing.JLabel(); txtTypeSecID = new javax.swing.JTextField(); jLabel4 = new javax.swing.JLabel(); txtMaxMark = new javax.swing.JTextField(); jScrollPane1 = new javax.swing.JScrollPane(); jTableSectionsActivities = new javax.swing.JTable(); txtArticle = new javax.swing.JTextField(); jLabel5 = new javax.swing.JLabel(); btnThem = new javax.swing.JButton(); btnSua = new javax.swing.JButton(); btnXoa = new javax.swing.JButton(); btnTKForm = new javax.swing.JButton(); jLabel6 = new javax.swing.JLabel(); txtMucCon = new javax.swing.JTextField(); setDefaultCloseOperation(javax.swing.WindowConstants.EXIT_ON_CLOSE); setName(“Form”); // NOI18N org.jdesktop.application.ResourceMap resourceMap = org.jdesktop.application.Application.getInstance(drl.DRLApp.class).getContext().getResourceMap(dsMucHD.class); jLabel1.setText(resourceMap.getString(“jLabel1.text”)); // NOI18N jLabel1.setName(“jLabel1”); // NOI18N txtSectionsName.setText(resourceMap.getString(“txtSectionsName.text”)); // NOI18N txtSectionsName.setName(“txtSectionsName”); // NOI18N jLabel2.setText(resourceMap.getString(“jLabel2.text”)); // NOI18N jLabel2.setName(“jLabel2”); // NOI18N txtSectionsID.setName(“txtSectionsID”); // NOI18N jLabel3.setText(resourceMap.getString(“jLabel3.text”)); // NOI18N jLabel3.setName(“jLabel3”); // NOI18N txtTypeSecID.setText(resourceMap.getString(“txtTypeSecID.text”)); // NOI18N txtTypeSecID.setName(“txtTypeSecID”); // NOI18N jLabel4.setText(resourceMap.getString(“jLabel4.text”)); // NOI18N jLabel4.setName(“jLabel4”); // NOI18N txtMaxMark.setText(resourceMap.getString(“txtMaxMark.text”)); // NOI18N txtMaxMark.setName(“txtMaxMark”); // NOI18N jScrollPane1.setName(“jScrollPane1”); // NOI18N jTableSectionsActivities.setModel(new javax.swing.table.DefaultTableModel( new Object [][] { {null, null, null, null}, {null, null, null, null}, {null, null, null, null}, {null, null, null, null} }, new String [] { “Title 1”, “Title 2”, “Title 3”, “Title 4” } )); jTableSectionsActivities.setName(“jTableSectionsActivities”); // NOI18N jTableSectionsActivities.addMouseListener(new java.awt.event.MouseAdapter() { public void mouseClicked(java.awt.event.MouseEvent evt) { jTableSectionsActivitiesMouseClicked(evt); } }); jScrollPane1.setViewportView(jTableSectionsActivities); txtArticle.setText(resourceMap.getString(“txtArticle.text”)); // NOI18N txtArticle.setName(“txtArticle”); // NOI18N jLabel5.setText(resourceMap.getString(“jLabel5.text”)); // NOI18N jLabel5.setName(“jLabel5”); // NOI18N btnThem.setText(resourceMap.getString(“btnThem.text”)); // NOI18N btnThem.setName(“btnThem”); // NOI18N btnThem.addMouseListener(new java.awt.event.MouseAdapter() { public void mouseClicked(java.awt.event.MouseEvent evt) { btnThemMouseClicked(evt); } }); btnSua.setText(resourceMap.getString(“btnSua.text”)); // NOI18N btnSua.setName(“btnSua”); // NOI18N btnSua.addMouseListener(new java.awt.event.MouseAdapter() { public void mouseClicked(java.awt.event.MouseEvent evt) { btnSuaMouseClicked(evt); } }); btnXoa.setText(resourceMap.getString(“btnXoa.text”)); // NOI18N btnXoa.setName(“btnXoa”); // NOI18N btnXoa.addMouseListener(new java.awt.event.MouseAdapter() { public void mouseClicked(java.awt.event.MouseEvent evt) { btnXoaMouseClicked(evt); } }); btnTKForm.setText(resourceMap.getString(“btnTKForm.text”)); // NOI18N btnTKForm.setName(“btnTKForm”); // NOI18N jLabel6.setText(resourceMap.getString(“jLabel6.text”)); // NOI18N jLabel6.setName(“jLabel6”); // NOI18N txtMucCon.setText(resourceMap.getString(“txtMucCon.text”)); // NOI18N txtMucCon.setName(“txtMucCon”); // NOI18N javax.swing.GroupLayout layout = new javax.swing.GroupLayout(getContentPane()); getContentPane().setLayout(layout); layout.setHorizontalGroup( layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING) .addGroup(javax.swing.GroupLayout.Alignment.TRAILING, layout.createSequentialGroup() .addContainerGap(118, Short.MAX_VALUE) .addComponent(jScrollPane1, javax.swing.GroupLayout.PREFERRED_SIZE, 452, javax.swing.GroupLayout.PREFERRED_SIZE) .addGap(68, 68, 68)) .addGroup(layout.createSequentialGroup() .addGap(170, 170, 170) .addComponent(btnThem, javax.swing.GroupLayout.PREFERRED_SIZE, 69, javax.swing.GroupLayout.PREFERRED_SIZE) .addGap(26, 26, 26) .addComponent(btnSua, javax.swing.GroupLayout.PREFERRED_SIZE, 75, javax.swing.GroupLayout.PREFERRED_SIZE) .addGap(30, 30, 30) .addComponent(btnXoa, javax.swing.GroupLayout.PREFERRED_SIZE, 65, javax.swing.GroupLayout.PREFERRED_SIZE) .addContainerGap(203, Short.MAX_VALUE)) .addGroup(layout.createSequentialGroup() .addGap(237, 237, 237) .addComponent(btnTKForm) .addContainerGap(288, Short.MAX_VALUE)) .addGroup(layout.createSequentialGroup() .addGap(40, 40, 40) .addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING) .addComponent(jLabel1, javax.swing.GroupLayout.PREFERRED_SIZE, 77, javax.swing.GroupLayout.PREFERRED_SIZE) .addComponent(jLabel3, javax.swing.GroupLayout.PREFERRED_SIZE, 77, javax.swing.GroupLayout.PREFERRED_SIZE) .addComponent(jLabel5, javax.swing.GroupLayout.PREFERRED_SIZE, 53, javax.swing.GroupLayout.PREFERRED_SIZE)) .addGap(37, 37, 37) .addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING) .addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING, false) .addComponent(txtTypeSecID) .addComponent(txtSectionsID, javax.swing.GroupLayout.DEFAULT_SIZE, 116, Short.MAX_VALUE)) .addComponent(txtArticle, javax.swing.GroupLayout.PREFERRED_SIZE, 113, javax.swing.GroupLayout.PREFERRED_SIZE)) .addGap(41, 41, 41) .addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING) .addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING, false) .addComponent(jLabel4, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE) .addComponent(jLabel2, javax.swing.GroupLayout.DEFAULT_SIZE, 71, Short.MAX_VALUE)) .addComponent(jLabel6)) .addGap(116, 116, 116) .addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING, false) .addComponent(txtMucCon) .addComponent(txtMaxMark) .addComponent(txtSectionsName, javax.swing.GroupLayout.DEFAULT_SIZE, 116, Short.MAX_VALUE)) .addContainerGap(javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)) ); layout.setVerticalGroup( layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING) .addGroup(layout.createSequentialGroup() .addGap(78, 78, 78) .addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE) .addComponent(jLabel1) .addComponent(jLabel2) .addComponent(txtSectionsName, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE) .addComponent(txtSectionsID, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)) .addGap(30, 30, 30) .addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE) .addComponent(jLabel3) .addComponent(txtTypeSecID, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE) .addComponent(jLabel4) .addComponent(txtMaxMark, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)) .addGap(29, 29, 29) .addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE) .addComponent(jLabel5) .addComponent(txtArticle, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE) .addComponent(jLabel6) .addComponent(txtMucCon, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)) .addGap(32, 32, 32) .addComponent(jScrollPane1, javax.swing.GroupLayout.PREFERRED_SIZE, 123, javax.swing.GroupLayout.PREFERRED_SIZE) .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED, 52, Short.MAX_VALUE) .addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE) .addComponent(btnThem, javax.swing.GroupLayout.PREFERRED_SIZE, 33, javax.swing.GroupLayout.PREFERRED_SIZE) .addComponent(btnSua, javax.swing.GroupLayout.PREFERRED_SIZE, 34, javax.swing.GroupLayout.PREFERRED_SIZE) .addComponent(btnXoa, javax.swing.GroupLayout.PREFERRED_SIZE, 35, javax.swing.GroupLayout.PREFERRED_SIZE)) .addGap(18, 18, 18) .addComponent(btnTKForm) .addGap(17, 17, 17)) ); pack(); }// private void jTableSectionsActivitiesMouseClicked(java.awt.event.MouseEvent evt) { // TODO add your handling code here: int index = jTableSectionsActivities.getSelectedRow(); txtSectionsID.setText((String) jTableSectionsActivities.getValueAt(index, 0)); txtSectionsName.setText((String) jTableSectionsActivities.getValueAt(index, 1)); txtMaxMark.setText((String)jTableSectionsActivities.getValueAt(index, 2)); txtArticle.setText((String)jTableSectionsActivities.getValueAt(index, 3)); txtTypeSecID.setText((String) jTableSectionsActivities.getValueAt(index, 4)); txtMucCon.setText((String)jTableSectionsActivities.getValueAt(index, 5)); } private void btnThemMouseClicked(java.awt.event.MouseEvent evt) { try { // TODO add your handling code here: muchd.ThemMucHD(txtSectionsID.getText(), txtSectionsName.getText(),txtMaxMark.getText(), txtArticle.getText(),txtTypeSecID.getText(), txtMucCon.getText()); String[] data={ txtSectionsID.getText(),txtSectionsName.getText(),txtMaxMark.getText(),txtArticle.getText(),txtTypeSecID.getText(),txtMucCon.getText()}; //String[] data1={“123″,”a”,”abc”,”qwe”,”can”,”bb”}; //model.addRow(data1); model.insertRow(0, data); jTableSectionsActivities.setModel(model); } catch(SQLException ex){System.out.println(“Error : “+ex); } } private void btnSuaMouseClicked(java.awt.event.MouseEvent evt) { // TODO add your handling code here: Connection connection; //tạo các biến cần thiết để truy xuất database try { Class.forName(“oracle.jdbc.driver.OracleDriver”); connection =DriverManager.getConnection(“jdbc:oracle:thin:@localhost:1521:XE”, “csdl1”, “123”); Statement statement = connection.createStatement(); String query = “update section_ACTIVITIES set sectionSNAME=\'”+txtSectionsName.getText()+”‘,MaxMark=\'”+txtMaxMark.getText()+”‘,Article=\'”+txtArticle.getText()+”‘,TypeSecID=\'”+txtTypeSecID.getText()+”‘where sectionSID=\'”+txtSectionsID.getText()+”‘”; statement.executeUpdate(query); int index= jTableSectionsActivities.getSelectedRow(); model.setValueAt(txtSectionsName.getText(), index, 1); model.setValueAt(txtMaxMark.getText(), index, 2); model.setValueAt(txtArticle.getText(), index, 3); model.setValueAt(txtTypeSecID.getText(), index, 4); statement.close(); connection.close(); jTableSectionsActivities.setModel(model); } catch(Exception ex){System.out.println(“Error : “+ex);} } private void btnXoaMouseClicked(java.awt.event.MouseEvent evt) { // TODO add your handling code here: Connection connection; //tạo các biến cần thiết để truy xuất database try { Class.forName(“oracle.jdbc.driver.OracleDriver”); connection =DriverManager.getConnection(“jdbc:oracle:thin:@localhost:1521:XE”, “csdl1”, “123”); Statement statement = connection.createStatement(); String query = “delete section_ACTIVITIES where sectionSID=\'”+txtSectionsID.getText()+”‘”; statement.executeUpdate(query); int index= jTableSectionsActivities.getSelectedRow(); model.removeRow(index); statement.close(); connection.close(); jTableSectionsActivities.setModel(model); } catch(Exception ex){System.out.println(“Error : “+ex);} } /** * @param args the command line arguments */ public static void main(String args[])throws SQLException { java.awt.EventQueue.invokeLater(new Runnable() { public void run() { try { new dsMucHD().setVisible(true); } catch (SQLException ex) { System.out.println(“Error :123″+ex); } } }); } private DefaultTableModel model; // Variables declaration – do not modify private javax.swing.JButton btnSua; private javax.swing.JButton btnTKForm; private javax.swing.JButton btnThem; private javax.swing.JButton btnXoa; private javax.swing.JLabel jLabel1; private javax.swing.JLabel jLabel2; private javax.swing.JLabel jLabel3; private javax.swing.JLabel jLabel4; private javax.swing.JLabel jLabel5; private javax.swing.JLabel jLabel6; private javax.swing.JScrollPane jScrollPane1; private javax.swing.JTable jTableSectionsActivities; private javax.swing.JTextField txtArticle; private javax.swing.JTextField txtMaxMark; private javax.swing.JTextField txtMucCon; private javax.swing.JTextField txtSectionsID; private javax.swing.JTextField txtSectionsName; private javax.swing.JTextField txtTypeSecID; // End of variables declaration } ////////CSDL ——————————————————– — File created – Wednesday-April-20-2011 ——————————————————– ——————————————————– — DDL for Table ACTIVITIES ——————————————————– CREATE TABLE “ACTIVITIES” ( “ACTIVITIESID” VARCHAR2(10), “ACTIVITIESNAME” NVARCHAR2(100), “DATETIME” DATE, “ORGANIZATIONS” NVARCHAR2(50), “LOCATION” NVARCHAR2(100), “SECTIONSID” VARCHAR2(10), “DEPARTMENTSID” VARCHAR2(10) ) ; ——————————————————– — DDL for Table CERTIFICATES ——————————————————– CREATE TABLE “CERTIFICATES” ( “CERTIFICATESID” VARCHAR2(10), “STUDENTSID” VARCHAR2(7), “YEAR” VARCHAR2(20) ) ; ——————————————————– — DDL for Table COMPLAINT ——————————————————– CREATE TABLE “COMPLAINT” ( “STUDENTSID” VARCHAR2(7), “COMPLAINTTYPE” NVARCHAR2(50), “COMPLAINTID” VARCHAR2(20), “FILENAME” VARCHAR2(20) ) ; ——————————————————– — DDL for Table DEPARTMENTS ——————————————————– CREATE TABLE “DEPARTMENTS” ( “DEPARTMENTSID” VARCHAR2(10), “DEPARTMENTSNAME” NVARCHAR2(50) ) ; ——————————————————– — DDL for Table DETAILS_CERTIFICATES ——————————————————– CREATE TABLE “DETAILS_CERTIFICATES” ( “CERTIFICATESID” VARCHAR2(10), “CERTIFICATESNAME” NVARCHAR2(50), “ORAGNIZATIONS” NVARCHAR2(50), “DATETIME” DATE, “ACTIVITIESID” VARCHAR2(10) ) ; ——————————————————– — DDL for Table DETAILS_ESTIMATIONS ——————————————————– CREATE TABLE “DETAILS_ESTIMATIONS” ( “ESTIMATIONSID” CHAR(10), “SECTIONSID” VARCHAR2(10), “MARK” NUMBER(*,0), “CLASSMARK” NUMBER(*,0), “FACULTIESMARK” NUMBER(*,0) ) ; ——————————————————– — DDL for Table DETAILS_FORM ——————————————————– CREATE TABLE “DETAILS_FORM” ( “FORMID” CHAR(10), “SECTIONSID” VARCHAR2(10) ) ; ——————————————————– — DDL for Table ESTIMATIONS ——————————————————– CREATE TABLE “ESTIMATIONS” ( “ESTIMATIONSID” CHAR(10), “STUDENTSID” VARCHAR2(7), “CAPTAINID” VARCHAR2(7), “TEACHERSID” VARCHAR2(10), “YEAR” VARCHAR2(20) ) ; ——————————————————– — DDL for Table FORM ——————————————————– CREATE TABLE “FORM” ( “FORMID” CHAR(10), “teachersID ” VARCHAR2(10), “YEAR” VARCHAR2(20) ) ; ——————————————————– — DDL for Table GRADE ——————————————————– CREATE TABLE “GRADE” ( “gradeID” VARCHAR2(10), “gradeName” NVARCHAR2(20), “fromMark” NUMBER(*,0), “toMark” NUMBER(*,0), “note” NVARCHAR2(100) ) ; ——————————————————– — DDL for Table PARTICIPATORS ——————————————————– CREATE TABLE “PARTICIPATORS” ( “STUDENTSID” VARCHAR2(10), “ACTIVITIESID” VARCHAR2(10), “RESULT” NVARCHAR2(20) ) ; ——————————————————– — DDL for Table RESULT_ESTIMATIONS ——————————————————– CREATE TABLE “RESULT_ESTIMATIONS” ( “YEAR” VARCHAR2(20), “STUDENTSID” VARCHAR2(7), “SUMMARK” NUMBER(*,0), “GRADENAME” NVARCHAR2(20) ) ; ——————————————————– — DDL for Table SECTION_ACTIVITIES ——————————————————– CREATE TABLE “SECTION_ACTIVITIES” ( “SECTIONSID” VARCHAR2(10), “SECTIONSNAME” NVARCHAR2(250), “MAXMARK” NVARCHAR2(20), “ARTICLE” NVARCHAR2(20), “TYPESECID” VARCHAR2(10), “SUBSECTIONID” VARCHAR2(10) ) ; ——————————————————– — DDL for Table SECTION_ESTIMATIONS ——————————————————– CREATE TABLE “SECTION_ESTIMATIONS” ( “ESTIMATIONSID” VARCHAR2(10), “SECTIONSID” VARCHAR2(10), “SECTIONSMARK” NUMBER(*,0), “SUMMARK” NUMBER(*,0) ) ; ——————————————————– — DDL for Table SOFT_ACTIVITIES ——————————————————– CREATE TABLE “SOFT_ACTIVITIES” ( “SOFTID” VARCHAR2(10), “ACTIVITIESNAME” NVARCHAR2(100), “DATETIME” DATE, “ORGANIZATIONS” NVARCHAR2(50), “location ” NVARCHAR2(100), “sectionsID ” VARCHAR2(10), “DEPARTMENTSID” VARCHAR2(10) ) ; ——————————————————– — DDL for Table STUDENTS ——————————————————– CREATE TABLE “STUDENTS” ( “STUDENTSID” VARCHAR2(10), “STUDENTSNAME” NVARCHAR2(50), “PASSWORD” VARCHAR2(15), “BIRTHDAY” DATE, “EMAIL” VARCHAR2(50), “ADDRESS” NVARCHAR2(100), “PHONE” VARCHAR2(11), “POSITION” NVARCHAR2(20), “AVERAGEMARK” FLOAT(5), “SUMMARK” NUMBER(*,0), “DEPARTMENTSID” VARCHAR2(10), “GRADENAME” NVARCHAR2(20) ) ; ——————————————————– — DDL for Table TEACHERS ——————————————————– CREATE TABLE “TEACHERS” ( “TEACHERSID” VARCHAR2(10), “TEACHERSNAME” NVARCHAR2(50), “PASSWORD” VARCHAR2(15), “BIRTHDAY” DATE, “EMAIL” VARCHAR2(50), “ADDRESS” NVARCHAR2(100), “PHONE” VARCHAR2(11), “POSITION” NVARCHAR2(20), “DEPARTMENTSID” VARCHAR2(10) ) ; ——————————————————– — DDL for Table TYPE_SECTIONS ——————————————————– CREATE TABLE “TYPE_SECTIONS” ( “TYPESECID” VARCHAR2(10), “TYPESECNAME” NVARCHAR2(200), “TEACHERSID” VARCHAR2(10), “NOTE” NVARCHAR2(50), “MARK” NUMBER(*,0) ) ; ————————————————— — DATA FOR TABLE ACTIVITIES — FILTER = none used ————————————————— REM INSERTING into ACTIVITIES Insert into ACTIVITIES (ACTIVITIESID,ACTIVITIESNAME,DATETIME,ORGANIZATIONS,LOCATION,SECTIONSID,DEPARTMENTSID) values (‘FA001′,’ngoclung’,to_timestamp(’12-JAN-10 12.00.00.000000000 AM’,’DD-MON-RR HH.MI.SS.FF AM’),’KHTN’,’truong’,’S001′,’D101′); Insert into ACTIVITIES (ACTIVITIESID,ACTIVITIESNAME,DATETIME,ORGANIZATIONS,LOCATION,SECTIONSID,DEPARTMENTSID) values (‘SA001′,’tudonghoaCN’,to_timestamp(’09-MAR-11 12.00.00.000000000 AM’,’DD-MON-RR HH.MI.SS.FF AM’),’truong’,null,’S002′,’D101′); Insert into ACTIVITIES (ACTIVITIESID,ACTIVITIESNAME,DATETIME,ORGANIZATIONS,LOCATION,SECTIONSID,DEPARTMENTSID) values (‘FA002′,’ngoclung’,to_timestamp(’01-JAN-10 12.00.00.000000000 AM’,’DD-MON-RR HH.MI.SS.FF AM’),’KHTN’,’truong’,’S001′,’D101′); Insert into ACTIVITIES (ACTIVITIESID,ACTIVITIESNAME,DATETIME,ORGANIZATIONS,LOCATION,SECTIONSID,DEPARTMENTSID) values (‘FA007′,’batdau’,to_timestamp(’09-SEP-11 12.00.00.000000000 AM’,’DD-MON-RR HH.MI.SS.FF AM’),null,null,’S001′,’D101′); ————————————————— — END DATA FOR TABLE ACTIVITIES ————————————————— ————————————————— — DATA FOR TABLE CERTIFICATES — FILTER = none used ————————————————— REM INSERTING into CERTIFICATES Insert into CERTIFICATES (CERTIFICATESID,STUDENTSID,YEAR) values (‘C001′,’0711141′,’2010’); Insert into CERTIFICATES (CERTIFICATESID,STUDENTSID,YEAR) values (‘C002′,’0711149′,’2010’); ————————————————— — END DATA FOR TABLE CERTIFICATES ————————————————— ————————————————— — DATA FOR TABLE COMPLAINT — FILTER = none used ————————————————— REM INSERTING into COMPLAINT Insert into COMPLAINT (STUDENTSID,COMPLAINTTYPE,COMPLAINTID,FILENAME) values (‘0711141′,’diem sai’,’C001′,’danhgia0711141′); Insert into COMPLAINT (STUDENTSID,COMPLAINTTYPE,COMPLAINTID,FILENAME) values (‘0711149′,’diem thi?u’,’C002′,’danhgia0711149′); ————————————————— — END DATA FOR TABLE COMPLAINT ————————————————— ————————————————— — DATA FOR TABLE DEPARTMENTS — FILTER = none used ————————————————— REM INSERTING into DEPARTMENTS Insert into DEPARTMENTS (DEPARTMENTSID,DEPARTMENTSNAME) values (‘D101′,’khoa to⮠tin’); Insert into DEPARTMENTS (DEPARTMENTSID,DEPARTMENTSNAME) values (‘D102′,’khoa CNTT’); ————————————————— — END DATA FOR TABLE DEPARTMENTS ————————————————— ————————————————— — DATA FOR TABLE DETAILS_CERTIFICATES — FILTER = none used ————————————————— REM INSERTING into DETAILS_CERTIFICATES Insert into DETAILS_CERTIFICATES (CERTIFICATESID,CERTIFICATESNAME,ORAGNIZATIONS,DATETIME,ACTIVITIESID) values (‘C001′,’thanh nien khࠥ’,’ѯᮧ,to_timestamp(’01-MAY-09 12.00.00.000000000 AM’,’DD-MON-RR HH.MI.SS.FF AM’),’FA001′); Insert into DETAILS_CERTIFICATES (CERTIFICATESID,CERTIFICATESNAME,ORAGNIZATIONS,DATETIME,ACTIVITIESID) values (‘C002′,’av’,’KHTN’,to_timestamp(’01-JAN-10 12.00.00.000000000 AM’,’DD-MON-RR HH.MI.SS.FF AM’),’SA001′); ————————————————— — END DATA FOR TABLE DETAILS_CERTIFICATES ————————————————— ————————————————— — DATA FOR TABLE DETAILS_ESTIMATIONS — FILTER = none used ————————————————— REM INSERTING into DETAILS_ESTIMATIONS Insert into DETAILS_ESTIMATIONS (ESTIMATIONSID,SECTIONSID,MARK,CLASSMARK,FACULTIESMARK) values (‘E003 ‘,’S001’,6,5,5); Insert into DETAILS_ESTIMATIONS (ESTIMATIONSID,SECTIONSID,MARK,CLASSMARK,FACULTIESMARK) values (‘E003 ‘,’S002’,3,3,3); Insert into DETAILS_ESTIMATIONS (ESTIMATIONSID,SECTIONSID,MARK,CLASSMARK,FACULTIESMARK) values (‘E001 ‘,’S003’,9,5,0); Insert into DETAILS_ESTIMATIONS (ESTIMATIONSID,SECTIONSID,MARK,CLASSMARK,FACULTIESMARK) values (‘E002 ‘,’S003’,11,11,9); Insert into DETAILS_ESTIMATIONS (ESTIMATIONSID,SECTIONSID,MARK,CLASSMARK,FACULTIESMARK) values (‘E001 ‘,’S002’,5,5,0); Insert into DETAILS_ESTIMATIONS (ESTIMATIONSID,SECTIONSID,MARK,CLASSMARK,FACULTIESMARK) values (‘E002 ‘,’S002’,5,5,5); Insert into DETAILS_ESTIMATIONS (ESTIMATIONSID,SECTIONSID,MARK,CLASSMARK,FACULTIESMARK) values (‘E001 ‘,’S001’,5,5,0); Insert into DETAILS_ESTIMATIONS (ESTIMATIONSID,SECTIONSID,MARK,CLASSMARK,FACULTIESMARK) values (‘E002 ‘,’S001’,11,9,10); ————————————————— — END DATA FOR TABLE DETAILS_ESTIMATIONS ————————————————— ————————————————— — DATA FOR TABLE DETAILS_FORM — FILTER = none used ————————————————— REM INSERTING into DETAILS_FORM Insert into DETAILS_FORM (FORMID,SECTIONSID) values (‘F001 ‘,’S001’); Insert into DETAILS_FORM (FORMID,SECTIONSID) values (‘F001 ‘,’S002’); Insert into DETAILS_FORM (FORMID,SECTIONSID) values (‘F001 ‘,’S003’); Insert into DETAILS_FORM (FORMID,SECTIONSID) values (‘F001 ‘,’S004’); Insert into DETAILS_FORM (FORMID,SECTIONSID) values (‘F001 ‘,’S005’); Insert into DETAILS_FORM (FORMID,SECTIONSID) values (‘F001 ‘,’S006’); Insert into DETAILS_FORM (FORMID,SECTIONSID) values (‘F001 ‘,’S007’); Insert into DETAILS_FORM (FORMID,SECTIONSID) values (‘F001 ‘,’S008’); Insert into DETAILS_FORM (FORMID,SECTIONSID) values (‘F001 ‘,’S009’); Insert into DETAILS_FORM (FORMID,SECTIONSID) values (‘F001 ‘,’S010’); Insert into DETAILS_FORM (FORMID,SECTIONSID) values (‘F001 ‘,’S011’); Insert into DETAILS_FORM (FORMID,SECTIONSID) values (‘F001 ‘,’S014’); Insert into DETAILS_FORM (FORMID,SECTIONSID) values (‘F001 ‘,’S015’); Insert into DETAILS_FORM (FORMID,SECTIONSID) values (‘F001 ‘,’S016’); Insert into DETAILS_FORM (FORMID,SECTIONSID) values (‘F001 ‘,’S017’); Insert into DETAILS_FORM (FORMID,SECTIONSID) values (‘F001 ‘,’S018’); Insert into DETAILS_FORM (FORMID,SECTIONSID) values (‘F001 ‘,’S019’); Insert into DETAILS_FORM (FORMID,SECTIONSID) values (‘F001 ‘,’S021’); Insert into DETAILS_FORM (FORMID,SECTIONSID) values (‘F001 ‘,’S024’); Insert into DETAILS_FORM (FORMID,SECTIONSID) values (‘F001 ‘,’S025’); Insert into DETAILS_FORM (FORMID,SECTIONSID) values (‘F001 ‘,’S026’); Insert into DETAILS_FORM (FORMID,SECTIONSID) values (‘F001 ‘,’S028’); Insert into DETAILS_FORM (FORMID,SECTIONSID) values (‘F001 ‘,’S029’); Insert into DETAILS_FORM (FORMID,SECTIONSID) values (‘F001 ‘,’S032’); Insert into DETAILS_FORM (FORMID,SECTIONSID) values (‘F001 ‘,’S033’); Insert into DETAILS_FORM (FORMID,SECTIONSID) values (‘F001 ‘,’S034’); Insert into DETAILS_FORM (FORMID,SECTIONSID) values (‘F001 ‘,’S035’); Insert into DETAILS_FORM (FORMID,SECTIONSID) values (‘F001 ‘,’S036’); Insert into DETAILS_FORM (FORMID,SECTIONSID) values (‘F001 ‘,’S037’); Insert into DETAILS_FORM (FORMID,SECTIONSID) values (‘F001 ‘,’S038’); Insert into DETAILS_FORM (FORMID,SECTIONSID) values (‘F001 ‘,’S039’); Insert into DETAILS_FORM (FORMID,SECTIONSID) values (‘F001 ‘,’S040’); Insert into DETAILS_FORM (FORMID,SECTIONSID) values (‘F001 ‘,’S041’); Insert into DETAILS_FORM (FORMID,SECTIONSID) values (‘F002 ‘,’S001’); ————————————————— — END DATA FOR TABLE DETAILS_FORM ————————————————— ————————————————— — DATA FOR TABLE ESTIMATIONS — FILTER = none used ————————————————— REM INSERTING into ESTIMATIONS Insert into ESTIMATIONS (ESTIMATIONSID,STUDENTSID,CAPTAINID,TEACHERSID,YEAR) values (‘E001 ‘,’0711141′,’0711149′,’gv001′,’2009’); Insert into ESTIMATIONS (ESTIMATIONSID,STUDENTSID,CAPTAINID,TEACHERSID,YEAR) values (‘E002 ‘,’0711149′,’0711149′,’gv001′,’2010’); Insert into ESTIMATIONS (ESTIMATIONSID,STUDENTSID,CAPTAINID,TEACHERSID,YEAR) values (‘E003 ‘,’0711188′,’0711141′,’gv001′,’2011’); ————————————————— — END DATA FOR TABLE ESTIMATIONS ————————————————— ————————————————— — DATA FOR TABLE FORM — FILTER = none used ————————————————— REM INSERTING into FORM Insert into FORM (FORMID,”teachersID “,YEAR) values (‘F001 ‘,’gv001’,null); Insert into FORM (FORMID,”teachersID “,YEAR) values (‘F002 ‘,’gv001’,null); ————————————————— — END DATA FOR TABLE FORM ————————————————— ————————————————— — DATA FOR TABLE GRADE — FILTER = none used ————————————————— REM INSERTING into GRADE Insert into GRADE (“gradeID”,”gradeName”,”fromMark”,”toMark”,”note”) values (‘G001′,’xu?t s?c’,50,60,’gi?i’); Insert into GRADE (“gradeID”,”gradeName”,”fromMark”,”toMark”,”note”) values (‘G002′,’kha’,60,90,’t?t’); Insert into GRADE (“gradeID”,”gradeName”,”fromMark”,”toMark”,”note”) values (‘G003′,’Gioi’,80,90,’1′); Insert into GRADE (“gradeID”,”gradeName”,”fromMark”,”toMark”,”note”) values (‘G004′,’Xuat sac’,90,100,null); ————————————————— — END DATA FOR TABLE GRADE ————————————————— ————————————————— — DATA FOR TABLE PARTICIPATORS — FILTER = none used ————————————————— REM INSERTING into PARTICIPATORS Insert into PARTICIPATORS (STUDENTSID,ACTIVITIESID,RESULT) values (‘0711188′,’FA001′,’´’); Insert into PARTICIPATORS (STUDENTSID,ACTIVITIESID,RESULT) values (‘0711149′,’FA001′,’´’); Insert into PARTICIPATORS (STUDENTSID,ACTIVITIESID,RESULT) values (‘0711149′,’FA002′,’´’); Insert into PARTICIPATORS (STUDENTSID,ACTIVITIESID,RESULT) values (‘0711149′,’SA001′,’´’); Insert into PARTICIPATORS (STUDENTSID,ACTIVITIESID,RESULT) values (‘0711141′,’FA001′,’t?t’); Insert into PARTICIPATORS (STUDENTSID,ACTIVITIESID,RESULT) values (‘0711141′,’FA002’,’kh᧩; ————————————————— — END DATA FOR TABLE PARTICIPATORS ————————————————— ————————————————— — DATA FOR TABLE RESULT_ESTIMATIONS — FILTER = none used ————————————————— REM INSERTING into RESULT_ESTIMATIONS Insert into RESULT_ESTIMATIONS (YEAR,STUDENTSID,SUMMARK,GRADENAME) values (‘2009′,’0711141′,80,’kha’); Insert into RESULT_ESTIMATIONS (YEAR,STUDENTSID,SUMMARK,GRADENAME) values (‘2010′,’0711141′,70,’kha’); Insert into RESULT_ESTIMATIONS (YEAR,STUDENTSID,SUMMARK,GRADENAME) values (‘2010′,’0711149′,80,’t?t’); ————————————————— — END DATA FOR TABLE RESULT_ESTIMATIONS ————————————————— ————————————————— — DATA FOR TABLE SECTION_ACTIVITIES — FILTER = none used ————————————————— REM INSERTING into SECTION_ACTIVITIES Insert into SECTION_ACTIVITIES (SECTIONSID,SECTIONSNAME,MAXMARK,ARTICLE,TYPESECID,SUBSECTIONID) values (‘S004′,’ݠth?c tham gia ho?t ??ng h?c thu?t’,’T?i ?a 15 ?i?m’,null,’TS001′,null); Insert into SECTION_ACTIVITIES (SECTIONSID,SECTIONSNAME,MAXMARK,ARTICLE,TYPESECID,SUBSECTIONID) values (‘S005′,’Tham gia NCKH, V??n ??m NCKH, ݠt??ng s⯧ t?o SV S-ideas:’,null,null,null,’S004′); Insert into SECTION_ACTIVITIES (SECTIONSID,SECTIONSNAME,MAXMARK,ARTICLE,TYPESECID,SUBSECTIONID) values (‘S006′,’Tham gia v࡮?p ?? t᩠d? thi:’,null,null,null,’S005′); Insert into SECTION_ACTIVITIES (SECTIONSID,SECTIONSNAME,MAXMARK,ARTICLE,TYPESECID,SUBSECTIONID) values (‘S007’,’Ch??ng tr “Sinh vi뮠NCKH”‘,’+3′,null,null,’S006’); Insert into SECTION_ACTIVITIES (SECTIONSID,SECTIONSNAME,MAXMARK,ARTICLE,TYPESECID,SUBSECTIONID) values (‘S008′,’Ch??ng tr “V??n ??m NCKH”, ݠt??ng s⯧ t?o SV S-ideas:’,’+3′,null,null,’S006′); Insert into SECTION_ACTIVITIES (SECTIONSID,SECTIONSNAME,MAXMARK,ARTICLE,TYPESECID,SUBSECTIONID) values (‘S009′,’Tham gia v࠿?t gi?i c?p tr??ng:’,null,null,null,’S005′); Insert into SECTION_ACTIVITIES (SECTIONSID,SECTIONSNAME,MAXMARK,ARTICLE,TYPESECID,SUBSECTIONID) values (‘S010′,’Gi?i I’,’+10′,null,null,’S009′); Insert into SECTION_ACTIVITIES (SECTIONSID,SECTIONSNAME,MAXMARK,ARTICLE,TYPESECID,SUBSECTIONID) values (‘S011′,’Gi?i II’,’+9′,null,null,’S009′); Insert into SECTION_ACTIVITIES (SECTIONSID,SECTIONSNAME,MAXMARK,ARTICLE,TYPESECID,SUBSECTIONID) values (‘S012′,’Gi?i III’,’+8′,null,null,’S009′); Insert into SECTION_ACTIVITIES (SECTIONSID,SECTIONSNAME,MAXMARK,ARTICLE,TYPESECID,SUBSECTIONID) values (‘S013′,’gi?i khuy?n kh’,’+7′,null,null,’S009′); Insert into SECTION_ACTIVITIES (SECTIONSID,SECTIONSNAME,MAXMARK,ARTICLE,TYPESECID,SUBSECTIONID) values (‘S014′,’Tham gia v࠿?t gi?i c?p thᯨ, c?p b? ho?c c⣠gi?i t??ng ???ng’,’+15′,null,null,’S005′); Insert into SECTION_ACTIVITIES (SECTIONSID,SECTIONSNAME,MAXMARK,ARTICLE,TYPESECID,SUBSECTIONID) values (‘S015′,’SV tham gia c⣠cu?c thi h?c thu?t do ?oᮠt? ch?c:’,null,null,null,’S004′); Insert into SECTION_ACTIVITIES (SECTIONSID,SECTIONSNAME,MAXMARK,ARTICLE,TYPESECID,SUBSECTIONID) values (‘S016′,’V򮧠lo?i ??t trung b tr? l뮧,’+3′,null,null,’S015’); Insert into SECTION_ACTIVITIES (SECTIONSID,SECTIONSNAME,MAXMARK,ARTICLE,TYPESECID,SUBSECTIONID) values (‘S017′,’V򮧠b⮠k?t ho?c lࡔV c?a BTC h?i thi H?c thu?t HTNV’,’+5′,null,null,’S015′); Insert into SECTION_ACTIVITIES (SECTIONSID,SECTIONSNAME,MAXMARK,ARTICLE,TYPESECID,SUBSECTIONID) values (‘S018′,’Tham gia v࠿?t gi?i’,null,null,null,’S015′); Insert into SECTION_ACTIVITIES (SECTIONSID,SECTIONSNAME,MAXMARK,ARTICLE,TYPESECID,SUBSECTIONID) values (‘S019′,’Gi?i I’,’+10′,null,null,’S018′); Insert into SECTION_ACTIVITIES (SECTIONSID,SECTIONSNAME,MAXMARK,ARTICLE,TYPESECID,SUBSECTIONID) values (‘S020′,’Gi?i II’,’+9′,null,null,’S018′); Insert into SECTION_ACTIVITIES (SECTIONSID,SECTIONSNAME,MAXMARK,ARTICLE,TYPESECID,SUBSECTIONID) values (‘S021′,’Gi?i III’,’+8′,null,null,’S018′); Insert into SECTION_ACTIVITIES (SECTIONSID,SECTIONSNAME,MAXMARK,ARTICLE,TYPESECID,SUBSECTIONID) values (‘S022′,’Gi?i khuy?n kh’,’+7′,null,null,’S018′); Insert into SECTION_ACTIVITIES (SECTIONSID,SECTIONSNAME,MAXMARK,ARTICLE,TYPESECID,SUBSECTIONID) values (‘S023′,’SV tham gia l?p t?p hu?n k? n?ng m?m, sinh ho?t chuy뮠?? NCKH’,’+3′,null,null,’S004′); Insert into SECTION_ACTIVITIES (SECTIONSID,SECTIONSNAME,MAXMARK,ARTICLE,TYPESECID,SUBSECTIONID) values (‘S024′,’Thᯨ vi뮠??i tuy?n c?p Tr??ng do ?oᮠTN, h?i SV thᯨ l?p’,’+5′,null,’TS003′,null); Insert into SECTION_ACTIVITIES (SECTIONSID,SECTIONSNAME,MAXMARK,ARTICLE,TYPESECID,SUBSECTIONID) values (‘S025′,’Thᯨ vi뮠??i tuy?n c?p Khoa, B? m’+3′,null,’TS003’,null); Insert into SECTION_ACTIVITIES (SECTIONSID,SECTIONSNAME,MAXMARK,ARTICLE,TYPESECID,SUBSECTIONID) values (‘S026′,’??t danh hi?u Thanh ni뮠kh?e do HSV Tr??ng ch?ng nh?n’,’+3′,null,’TS003′,null); Insert into SECTION_ACTIVITIES (SECTIONSID,SECTIONSNAME,MAXMARK,ARTICLE,TYPESECID,SUBSECTIONID) values (‘S027′,’Tham gia ho?t ??ng ch tr?, v?n th? m? do: Tr??ng, Khoa t? ch?c Khoa, B? m?oᮬ H?i t? ch?c’,’+5′,null,’TS003′,null); Insert into SECTION_ACTIVITIES (SECTIONSID,SECTIONSNAME,MAXMARK,ARTICLE,TYPESECID,SUBSECTIONID) values (‘S028′,’Tham gia chi?n d?ch m񡠫衸anh:’,null,null,’TS003′,null); Insert into SECTION_ACTIVITIES (SECTIONSID,SECTIONSNAME,MAXMARK,ARTICLE,TYPESECID,SUBSECTIONID) values (‘S029′,’??t danh hi?u ??i tr??ng xu?t s?c ho?c khen th??ng’,’+10′,null,null,’S028′); Insert into SECTION_ACTIVITIES (SECTIONSID,SECTIONSNAME,MAXMARK,ARTICLE,TYPESECID,SUBSECTIONID) values (‘S030′,’Danh hi?u chi?n s? gi?i’,’+9′,null,null,’S028′); Insert into SECTION_ACTIVITIES (SECTIONSID,SECTIONSNAME,MAXMARK,ARTICLE,TYPESECID,SUBSECTIONID) values (‘S032′,’Tham gia c⣠ho?t ??ng, c⣠l?n huy ??ng l?c l??ng c?p Tr??ng’,’+3′,null,’TS003′,null); Insert into SECTION_ACTIVITIES (SECTIONSID,SECTIONSNAME,MAXMARK,ARTICLE,TYPESECID,SUBSECTIONID) values (‘S033′,’Tham gia hi?n mⵠnh㮠??o nh?t 1 l?n trong n?m’,’+5′,null,’TS004′,null); Insert into SECTION_ACTIVITIES (SECTIONSID,SECTIONSNAME,MAXMARK,ARTICLE,TYPESECID,SUBSECTIONID) values (‘S034′,’Tham gia ho?t ??ng t nguy?n :’,null,null,’TS004′,null); Insert into SECTION_ACTIVITIES (SECTIONSID,SECTIONSNAME,MAXMARK,ARTICLE,TYPESECID,SUBSECTIONID) values (‘S003′,’Vi ph?m (c󠢡o c⯠ho?c bi뮠b?n)’,’-10′,’gg’,null,’S001′); Insert into SECTION_ACTIVITIES (SECTIONSID,SECTIONSNAME,MAXMARK,ARTICLE,TYPESECID,SUBSECTIONID) values (‘S031′,’Chi?n s? t nguy?n’,’+7′,null,’TS001′,’S028′); Insert into SECTION_ACTIVITIES (SECTIONSID,SECTIONSNAME,MAXMARK,ARTICLE,TYPESECID,SUBSECTIONID) values (‘S001′,’Th?c hi?n quy ch? v? h?c v? (h?c, ki?m tra, thi TN)’,null,’Khoa’,’TS001′,null); Insert into SECTION_ACTIVITIES (SECTIONSID,SECTIONSNAME,MAXMARK,ARTICLE,TYPESECID,SUBSECTIONID) values (‘S002′,’Khvi ph?m’,’+5′,’tr??ng’,null,’S001′); Insert into SECTION_ACTIVITIES (SECTIONSID,SECTIONSNAME,MAXMARK,ARTICLE,TYPESECID,SUBSECTIONID) values (‘S035′,’Tham gia nh?t 2 ho?t ??ng t nguy?n trong n?m’,’+5′,null,null,’S034′); Insert into SECTION_ACTIVITIES (SECTIONSID,SECTIONSNAME,MAXMARK,ARTICLE,TYPESECID,SUBSECTIONID) values (‘S036′,’Lࡢan t? ch?c, thᯨ vi뮠ban ?i?u hᯨ c⣠??i sinh vi뮧,’+2d/l?n’,null,null,’S034′); Insert into SECTION_ACTIVITIES (SECTIONSID,SECTIONSNAME,MAXMARK,ARTICLE,TYPESECID,SUBSECTIONID) values (‘S037′,’Ng??i con hi?u th?o, SV s?ng ??p, ng??i t?t vi?c t?t, SV 3 t?t’,’+5′,null,’TS004′,null); Insert into SECTION_ACTIVITIES (SECTIONSID,SECTIONSNAME,MAXMARK,ARTICLE,TYPESECID,SUBSECTIONID) values (‘S038′,’Tham gia c⣠ho?t ??ng, x㡨?i do Kho, B? m? ch?c’,’+5′,null,’TS004′,null); Insert into SECTION_ACTIVITIES (SECTIONSID,SECTIONSNAME,MAXMARK,ARTICLE,TYPESECID,SUBSECTIONID) values (‘S039′,’Ban c⮠s? l?p’,null,null,’TS005′,null); Insert into SECTION_ACTIVITIES (SECTIONSID,SECTIONSNAME,MAXMARK,ARTICLE,TYPESECID,SUBSECTIONID) values (‘S040′,’Hoᮠthᯨ xu?t s?c nhi?m v? (c󠧩?y khen)’,’+5′,null,null,’S039′); Insert into SECTION_ACTIVITIES (SECTIONSID,SECTIONSNAME,MAXMARK,ARTICLE,TYPESECID,SUBSECTIONID) values (‘S041′,’Hoᮠthᯨ t?t nhi?m v?’,’+4′,null,null,’S039′); Insert into SECTION_ACTIVITIES (SECTIONSID,SECTIONSNAME,MAXMARK,ARTICLE,TYPESECID,SUBSECTIONID) values (‘S042′,’Hoᮠthᯨ nhi?n v?’,’+2′,null,null,’S039′); Insert into SECTION_ACTIVITIES (SECTIONSID,SECTIONSNAME,MAXMARK,ARTICLE,TYPESECID,SUBSECTIONID) values (‘S043′,’Khhoᮠthᯨ nhi?m v?’,null,null,null,’S039′); ————————————————— — END DATA FOR TABLE SECTION_ACTIVITIES ————————————————— ————————————————— — DATA FOR TABLE SECTION_ESTIMATIONS — FILTER = none used ————————————————— REM INSERTING into SECTION_ESTIMATIONS Insert into SECTION_ESTIMATIONS (ESTIMATIONSID,SECTIONSID,SECTIONSMARK,SUMMARK) values (‘E001′,’S001’,10,null); Insert into SECTION_ESTIMATIONS (ESTIMATIONSID,SECTIONSID,SECTIONSMARK,SUMMARK) values (‘E002′,’S002’,10,null); Insert into SECTION_ESTIMATIONS (ESTIMATIONSID,SECTIONSID,SECTIONSMARK,SUMMARK) values (‘E001′,’S002’,15,null); ————————————————— — END DATA FOR TABLE SECTION_ESTIMATIONS ————————————————— ————————————————— — DATA FOR TABLE SOFT_ACTIVITIES — FILTER = none used ————————————————— REM INSERTING into SOFT_ACTIVITIES Insert into SOFT_ACTIVITIES (SOFTID,ACTIVITIESNAME,DATETIME,ORGANIZATIONS,”location “,”sectionsID “,DEPARTMENTSID) values (‘SA001′,’thanh ni뮠kh?a’,to_timestamp(’01-MAY-10 12.00.00.000000000 AM’,’DD-MON-RR HH.MI.SS.FF AM’),’?oᮧ,’qu?n 2′,’S001′,’D101′); Insert into SOFT_ACTIVITIES (SOFTID,ACTIVITIESNAME,DATETIME,ORGANIZATIONS,”location “,”sectionsID “,DEPARTMENTSID) values (‘SA002′,’av’,to_timestamp(’11-MAR-11 12.00.00.000000000 AM’,’DD-MON-RR HH.MI.SS.FF AM’),’h?i’,’q4′,’S002′,’D102′); ————————————————— — END DATA FOR TABLE SOFT_ACTIVITIES ————————————————— ————————————————— — DATA FOR TABLE STUDENTS — FILTER = none used ————————————————— REM INSERTING into STUDENTS Insert into STUDENTS (STUDENTSID,STUDENTSNAME,PASSWORD,BIRTHDAY,EMAIL,ADDRESS,PHONE,POSITION,AVERAGEMARK,SUMMARK,DEPARTMENTSID,GRADENAME) values (‘0711149′,’nguyen van b’,’ngockhung’,to_timestamp(’01-MAY-09 12.00.00.000000000 AM’,’DD-MON-RR HH.MI.SS.FF AM’),’b@yahoo.com’,null,’01682147012′,null,0.5,7,’D101′,’Gioi’); Insert into STUDENTS (STUDENTSID,STUDENTSNAME,PASSWORD,BIRTHDAY,EMAIL,ADDRESS,PHONE,POSITION,AVERAGEMARK,SUMMARK,DEPARTMENTSID,GRADENAME) values (‘0711141′,’pham ngoc mai’,’mai’,to_timestamp(’01-JAN-10 12.00.00.000000000 AM’,’DD-MON-RR HH.MI.SS.FF AM’),’@maiyahoio’,null,null,null,1,2,’D101′,’Gioi’); Insert into STUDENTS (STUDENTSID,STUDENTSNAME,PASSWORD,BIRTHDAY,EMAIL,ADDRESS,PHONE,POSITION,AVERAGEMARK,SUMMARK,DEPARTMENTSID,GRADENAME) values (‘0711188′,’thai thanh son’,’son’,null,null,null,null,null,null,null,’D101′,’Gioi’); ————————————————— — END DATA FOR TABLE STUDENTS ————————————————— ————————————————— — DATA FOR TABLE TEACHERS — FILTER = none used ————————————————— REM INSERTING into TEACHERS Insert into TEACHERS (TEACHERSID,TEACHERSNAME,PASSWORD,BIRTHDAY,EMAIL,ADDRESS,PHONE,POSITION,DEPARTMENTSID) values (‘gv001′,’nguyen van a’,’bautroi’,to_timestamp(’01-MAY-09 12.00.00.000000000 AM’,’DD-MON-RR HH.MI.SS.FF AM’),’a@yahoo.com’,’01682147012′,null,null,’D101′); Insert into TEACHERS (TEACHERSID,TEACHERSNAME,PASSWORD,BIRTHDAY,EMAIL,ADDRESS,PHONE,POSITION,DEPARTMENTSID) values (‘gv002′,’doan thi huong’,’123′,null,null,null,null,null,’D102′); ————————————————— — END DATA FOR TABLE TEACHERS ————————————————— ————————————————— — DATA FOR TABLE TYPE_SECTIONS — FILTER = none used ————————————————— REM INSERTING into TYPE_SECTIONS Insert into TYPE_SECTIONS (TYPESECID,TYPESECNAME,TEACHERSID,NOTE,MARK) values (‘TS006′,’Sinh vi뮠c󠴨ᯨ t ??c bi?t’,’gv002′,’T?i ?a 10 ?i?m’,10); Insert into TYPE_SECTIONS (TYPESECID,TYPESECNAME,TEACHERSID,NOTE,MARK) values (‘TS001′,’?c h?c t?p’,’gv001′,’T?i ?a 30 ?i?m’,30); Insert into TYPE_SECTIONS (TYPESECID,TYPESECNAME,TEACHERSID,NOTE,MARK) values (‘TS002′,’ݠth?c v࡫?t qu? ch?p hᯨ n?i quy, quy ch? trong nhࡴr??ng’,’gv001′,’T?i ?a 25 ?i?m’,25); Insert into TYPE_SECTIONS (TYPESECID,TYPESECNAME,TEACHERSID,NOTE,MARK) values (‘TS003′,’ݠth?c v࡫?t qu? tham gia c⣠ho?t ??ng CT-XH, VH, V?n ngh?, Th? Thao, Ph򮧠ch?ng c⣠t? n?n x㡨?i’,’gv001′,’T?i ?a 20 ?i?m’,20); Insert into TYPE_SECTIONS (TYPESECID,TYPESECNAME,TEACHERSID,NOTE,MARK) values (‘TS004′,’Ph?m ch?t cd㮠vࡱuan h? c?ng ??ng’,’gv001′,’T?i ?a 15 ?i?m’,15); Insert into TYPE_SECTIONS (TYPESECID,TYPESECNAME,TEACHERSID,NOTE,MARK) values (‘TS005′,’ݠth?c v࡫?t qu? tham gia ph? tr⤨ l?p sinh vi뮬 c⣠?oᮠth?, t? ch?c kh⣠trong nhࡴr??ng’,’gv002′,’T?i ?a 10 ?i?m’,10); ————————————————— — END DATA FOR TABLE TYPE_SECTIONS ————————————————— ——————————————————– — Constraints for Table COMPLAINT ——————————————————– ALTER TABLE “COMPLAINT” ADD CONSTRAINT “COMPLAINT_PK” PRIMARY KEY (“STUDENTSID”, “COMPLAINTID”) ENABLE; ALTER TABLE “COMPLAINT” MODIFY (“STUDENTSID” NOT NULL ENABLE); ALTER TABLE “COMPLAINT” MODIFY (“COMPLAINTID” NOT NULL ENABLE); ——————————————————– — Constraints for Table ACTIVITIES ——————————————————– ALTER TABLE “ACTIVITIES” ADD CONSTRAINT “ACTIVITIES_PK” PRIMARY KEY (“ACTIVITIESID”) ENABLE; ALTER TABLE “ACTIVITIES” MODIFY (“ACTIVITIESID” NOT NULL ENABLE); ——————————————————– — Constraints for Table ESTIMATIONS ——————————————————– ALTER TABLE “ESTIMATIONS” ADD CONSTRAINT “ESTIMATIONS_PK” PRIMARY KEY (“ESTIMATIONSID”) ENABLE; ALTER TABLE “ESTIMATIONS” MODIFY (“ESTIMATIONSID” NOT NULL ENABLE); ——————————————————– — Constraints for Table SECTION_ACTIVITIES ——————————————————– ALTER TABLE “SECTION_ACTIVITIES” ADD CONSTRAINT “SECTION_ACTIVITIES_PK” PRIMARY KEY (“SECTIONSID”) ENABLE; ALTER TABLE “SECTION_ACTIVITIES” MODIFY (“SECTIONSID” NOT NULL ENABLE); ——————————————————– — Constraints for Table CERTIFICATES ——————————————————– ALTER TABLE “CERTIFICATES” ADD CONSTRAINT “CERTIFICATES_PK” PRIMARY KEY (“CERTIFICATESID”) ENABLE; ALTER TABLE “CERTIFICATES” MODIFY (“CERTIFICATESID” NOT NULL ENABLE); ALTER TABLE “CERTIFICATES” MODIFY (“STUDENTSID” NOT NULL ENABLE); ——————————————————– — Constraints for Table STUDENTS ——————————————————– ALTER TABLE “STUDENTS” ADD CONSTRAINT “STUDENTS_PK” PRIMARY KEY (“STUDENTSID”) ENABLE; ALTER TABLE “STUDENTS” MODIFY (“STUDENTSID” NOT NULL ENABLE); ALTER TABLE “STUDENTS” MODIFY (“DEPARTMENTSID” NOT NULL ENABLE); ——————————————————– — Constraints for Table FORM ——————————————————– ALTER TABLE “FORM” ADD CONSTRAINT “FORM_PK” PRIMARY KEY (“FORMID”) ENABLE; ALTER TABLE “FORM” MODIFY (“FORMID” NOT NULL ENABLE); ALTER TABLE “FORM” MODIFY (“teachersID ” NOT NULL ENABLE); ——————————————————– — Constraints for Table PARTICIPATORS ——————————————————– ALTER TABLE “PARTICIPATORS” ADD CONSTRAINT “PARTICIPATORS_PK” PRIMARY KEY (“STUDENTSID”, “ACTIVITIESID”) ENABLE; ALTER TABLE “PARTICIPATORS” MODIFY (“STUDENTSID” NOT NULL ENABLE); ALTER TABLE “PARTICIPATORS” MODIFY (“ACTIVITIESID” NOT NULL ENABLE); ——————————————————– — Constraints for Table GRADE ——————————————————– ALTER TABLE “GRADE” ADD CONSTRAINT “GRADE_PK” PRIMARY KEY (“gradeID”) ENABLE; ALTER TABLE “GRADE” ADD CONSTRAINT “GRADE_UK1” UNIQUE (“gradeName”) ENABLE; ALTER TABLE “GRADE” MODIFY (“gradeID” NOT NULL ENABLE); ——————————————————– — Constraints for Table TYPE_SECTIONS ——————————————————– ALTER TABLE “TYPE_SECTIONS” MODIFY (“TYPESECID” NOT NULL ENABLE); ALTER TABLE “TYPE_SECTIONS” MODIFY (“TEACHERSID” NOT NULL ENABLE); ALTER TABLE “TYPE_SECTIONS” ADD CONSTRAINT “TYPE_SECTIONS_PK” PRIMARY KEY (“TYPESECID”) ENABLE; ——————————————————– — Constraints for Table TEACHERS ——————————————————– ALTER TABLE “TEACHERS” MODIFY (“TEACHERSID” NOT NULL ENABLE); ALTER TABLE “TEACHERS” MODIFY (“DEPARTMENTSID” NOT NULL ENABLE); ALTER TABLE “TEACHERS” ADD CONSTRAINT “TEACHERS_PK” PRIMARY KEY (“TEACHERSID”) ENABLE; ——————————————————– — Constraints for Table DETAILS_ESTIMATIONS ——————————————————– ALTER TABLE “DETAILS_ESTIMATIONS” ADD CONSTRAINT “DETAILS_ESTIMATIONS_PK” PRIMARY KEY (“ESTIMATIONSID”, “SECTIONSID”) ENABLE; ALTER TABLE “DETAILS_ESTIMATIONS” MODIFY (“ESTIMATIONSID” NOT NULL ENABLE); ALTER TABLE “DETAILS_ESTIMATIONS” MODIFY (“SECTIONSID” NOT NULL ENABLE); ——————————————————– — Constraints for Table SOFT_ACTIVITIES ——————————————————– ALTER TABLE “SOFT_ACTIVITIES” ADD CONSTRAINT “SOFT_ACTIVITIES_PK” PRIMARY KEY (“SOFTID”) ENABLE; ALTER TABLE “SOFT_ACTIVITIES” MODIFY (“SOFTID” NOT NULL ENABLE); ALTER TABLE “SOFT_ACTIVITIES” MODIFY (“DEPARTMENTSID” NOT NULL ENABLE); ——————————————————– — Constraints for Table DETAILS_CERTIFICATES ——————————————————– ALTER TABLE “DETAILS_CERTIFICATES” ADD CONSTRAINT “DETAILS_CERTIFICATES_PK” PRIMARY KEY (“CERTIFICATESID”, “ACTIVITIESID”) ENABLE; ALTER TABLE “DETAILS_CERTIFICATES” MODIFY (“CERTIFICATESID” NOT NULL ENABLE); ALTER TABLE “DETAILS_CERTIFICATES” MODIFY (“ACTIVITIESID” NOT NULL ENABLE); ——————————————————– — Constraints for Table DEPARTMENTS ——————————————————– ALTER TABLE “DEPARTMENTS” ADD CONSTRAINT “DEPARTMENTS_PK” PRIMARY KEY (“DEPARTMENTSID”) ENABLE; ALTER TABLE “DEPARTMENTS” MODIFY (“DEPARTMENTSID” NOT NULL ENABLE); ——————————————————– — Constraints for Table SECTION_ESTIMATIONS ——————————————————– ALTER TABLE “SECTION_ESTIMATIONS” ADD CONSTRAINT “SECTION_ESTIMATIONS_PK” PRIMARY KEY (“ESTIMATIONSID”, “SECTIONSID”) ENABLE; ALTER TABLE “SECTION_ESTIMATIONS” MODIFY (“ESTIMATIONSID” NOT NULL ENABLE); ALTER TABLE “SECTION_ESTIMATIONS” MODIFY (“SECTIONSID” NOT NULL ENABLE); ——————————————————– — Constraints for Table RESULT_ESTIMATIONS ——————————————————– ALTER TABLE “RESULT_ESTIMATIONS” ADD CONSTRAINT “RESULT_ESTIMATIONS_PK” PRIMARY KEY (“YEAR”, “STUDENTSID”) ENABLE; ALTER TABLE “RESULT_ESTIMATIONS” MODIFY (“YEAR” NOT NULL ENABLE); ALTER TABLE “RESULT_ESTIMATIONS” MODIFY (“STUDENTSID” NOT NULL ENABLE); ——————————————————– — Constraints for Table DETAILS_FORM ——————————————————– ALTER TABLE “DETAILS_FORM” ADD CONSTRAINT “DETAILS_FORM_PK” PRIMARY KEY (“FORMID”, “SECTIONSID”) ENABLE; ALTER TABLE “DETAILS_FORM” MODIFY (“FORMID” NOT NULL ENABLE); ALTER TABLE “DETAILS_FORM” MODIFY (“SECTIONSID” NOT NULL ENABLE); ——————————————————– — DDL for Index FORM_PK ——————————————————– CREATE UNIQUE INDEX “FORM_PK” ON “FORM” (“FORMID”) ; ——————————————————– — DDL for Index DETAILS_ESTIMATIONS_PK ——————————————————– CREATE UNIQUE INDEX “DETAILS_ESTIMATIONS_PK” ON “DETAILS_ESTIMATIONS” (“ESTIMATIONSID”, “SECTIONSID”) ; ——————————————————– — DDL for Index RESULT_ESTIMATIONS_PK ——————————————————– CREATE UNIQUE INDEX “RESULT_ESTIMATIONS_PK” ON “RESULT_ESTIMATIONS” (“YEAR”, “STUDENTSID”) ; ——————————————————– — DDL for Index SOFT_ACTIVITIES_PK ——————————————————– CREATE UNIQUE INDEX “SOFT_ACTIVITIES_PK” ON “SOFT_ACTIVITIES” (“SOFTID”) ; ——————————————————– — DDL for Index TEACHERS_PK ——————————————————– CREATE UNIQUE INDEX “TEACHERS_PK” ON “TEACHERS” (“TEACHERSID”) ; ——————————————————– — DDL for Index PARTICIPATORS_PK ——————————————————– CREATE UNIQUE INDEX “PARTICIPATORS_PK” ON “PARTICIPATORS” (“STUDENTSID”, “ACTIVITIESID”) ; ——————————————————– — DDL for Index STUDENTS_PK ——————————————————– CREATE UNIQUE INDEX “STUDENTS_PK” ON “STUDENTS” (“STUDENTSID”) ; ——————————————————– — DDL for Index ESTIMATIONS_PK ——————————————————– CREATE UNIQUE INDEX “ESTIMATIONS_PK” ON “ESTIMATIONS” (“ESTIMATIONSID”) ; ——————————————————– — DDL for Index CERTIFICATES_PK ——————————————————– CREATE UNIQUE INDEX “CERTIFICATES_PK” ON “CERTIFICATES” (“CERTIFICATESID”) ; ——————————————————– — DDL for Index ACTIVITIES_PK ——————————————————– CREATE UNIQUE INDEX “ACTIVITIES_PK” ON “ACTIVITIES” (“ACTIVITIESID”) ; ——————————————————– — DDL for Index GRADE_PK ——————————————————– CREATE UNIQUE INDEX “GRADE_PK” ON “GRADE” (“gradeID”) ; ——————————————————– — DDL for Index SECTION_ACTIVITIES_PK ——————————————————– CREATE UNIQUE INDEX “SECTION_ACTIVITIES_PK” ON “SECTION_ACTIVITIES” (“SECTIONSID”) ; ——————————————————– — DDL for Index GRADE_UK1 ——————————————————– CREATE UNIQUE INDEX “GRADE_UK1” ON “GRADE” (“gradeName”) ; ——————————————————– — DDL for Index SECTION_ESTIMATIONS_PK ——————————————————– CREATE UNIQUE INDEX “SECTION_ESTIMATIONS_PK” ON “SECTION_ESTIMATIONS” (“ESTIMATIONSID”, “SECTIONSID”) ; ——————————————————– — DDL for Index DETAILS_CERTIFICATES_PK ——————————————————– CREATE UNIQUE INDEX “DETAILS_CERTIFICATES_PK” ON “DETAILS_CERTIFICATES” (“CERTIFICATESID”, “ACTIVITIESID”) ; ——————————————————– — DDL for Index DEPARTMENTS_PK ——————————————————– CREATE UNIQUE INDEX “DEPARTMENTS_PK” ON “DEPARTMENTS” (“DEPARTMENTSID”) ; ——————————————————– — DDL for Index COMPLAINT_PK ——————————————————– CREATE UNIQUE INDEX “COMPLAINT_PK” ON “COMPLAINT” (“STUDENTSID”, “COMPLAINTID”) ; ——————————————————– — DDL for Index DETAILS_FORM_PK ——————————————————– CREATE UNIQUE INDEX “DETAILS_FORM_PK” ON “DETAILS_FORM” (“FORMID”, “SECTIONSID”) ; ——————————————————– — DDL for Index TYPE_SECTIONS_PK ——————————————————– CREATE UNIQUE INDEX “TYPE_SECTIONS_PK” ON “TYPE_SECTIONS” (“TYPESECID”) ; ——————————————————– — Ref Constraints for Table ACTIVITIES ——————————————————– ALTE
  22. mai said

    bi loi khi nhan nut them khi load lai thi van co du lieu

  23. Jimmy said

    Dear,Thầy em tạo ra 4 cái Checkbox,nhưng nó nằm không thẳng cột.Cách nào để mình add Checkbox thẳng cột không lệch ra,lệch vô.

    import java.awt.*;
    import java.awt.event.*;
    public class AL2 extends Frame implements WindowListener,ActionListener {
    TextField filename1 = new TextField(20);
    TextField filename2 = new TextField(20);
    Button b;
    private int numClicks = 0;
    CheckboxGroup radioGroup;
    Checkbox radio1;
    Checkbox radio2;
    Checkbox radio3;
    Checkbox radio4;

    public static void main(String[] args) {
    AL2 myWindow = new AL2(“Superposition.java”);
    myWindow.setSize(700,200);
    myWindow.setVisible(true);
    }

    public AL2(String title) {

    super(title);
    setLayout(new FlowLayout());
    addWindowListener(this);
    b = new Button(“Go”);
    add(b);
    add(filename1);
    add(filename2);
    b.addActionListener(this);
    radioGroup = new CheckboxGroup();
    radio1 = new Checkbox(“Superposition by sequence alignment and modify the last column by RMSD”, radioGroup,false);
    radio2 = new Checkbox(“Superposition by sequence alignment and modify the last column by temperature factor”, radioGroup,false);
    radio3 = new Checkbox(“Superposition by 3D structure and modify the last column by RMSD”,radioGroup,true);
    radio4 = new Checkbox(“Superposition by 3D structure and modify the last column by temperature factor”, radioGroup,true);
    add(radio1);
    add(radio2);
    add(radio3);
    add(radio4);
    }

    public void actionPerformed(ActionEvent e) {
    numClicks++;
    filename1.setText(“Heo kiss cop ” + numClicks + ” cai”);
    }

    public void windowClosing(WindowEvent e) {
    dispose();
    System.exit(0);
    }

    public void windowOpened(WindowEvent e) {}
    public void windowActivated(WindowEvent e) {}
    public void windowIconified(WindowEvent e) {}
    public void windowDeiconified(WindowEvent e) {}
    public void windowDeactivated(WindowEvent e) {}
    public void windowClosed(WindowEvent e) {}

    }

  24. Jimmy said

    Nhờ thầy gợi ý:
    cách tạo GUI cho cái chương trình tìm những từ giống nhau của 2 cái file.txt,hỏi người dùng nhập tên của file1,file2 sau đó mình nhấn button “go” run chương trình tạo ra file3 : chứa các từ đó.

  25. Võ Văn Hải said

    phải xem xét thuật toán lại. Nếu dùng vét cạn có lẽ là giải pháp sau cùng.

  26. Võ Văn Hải said

    không dùng FlowLayout, dùng BoxLayout the Y_AXIS là ok.

  27. Bình said

    em chào thầy, em là sinh viên, em đang học lập trình mạng bằng java netbean, thầy có thể hướng dẫn giúp em bài này được không ah,
    ví dụ mình cho jcheckbox 1= Nguyễn, jcheckbox 2=Văn, jcheckbox 3=trường
    khi mình check vào 1,2,3 thì se nối 3 chuổi là Nguyễn văn trường.
    còn ngược lại nếu check 1,3 thì Nguyễn Trường.
    em làm hoài nhung hok được
    mong thầy giúp đỡ
    em cảm ơn thầy

  28. boyksochit said

    Em chào thầy! Thầy ơi, em đang tìm hiểu về ngôn ngữ Java và muốn làm 1 chủ đề Ứng dụng Web (viết bằng ngôn ngữ Java). Thầy có thể góp ý cho em về vấn đề này không ạ? Em cảm ơn thầy

  29. Nam said

    Thầy cho em hỏi là làm thế nào để chèn Hình ảnh vào JTable, Em sử dụng Renderer theo hưỡng dẫn nhưng nó lại thực hiện với tất cả các ô trong cung 1 cột. Giờ em muốn các ô khác nhau có những hình ảnh khác nhau. Em cảm ơn thầy

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s

 
%d bloggers like this: