Package database

Examples of database.DatabaseConnection


    this.add(left);
    this.add(right);   
  }
 
  public void addEntrys() throws ProblemwithDataApplication{
    DatabaseConnection con = DatabaseConnection.getInstance();
    con.connect();
    left.removeAll();
    try {     
      gambler = con.getAllGamblers();
    } catch (ProblemwithDataApplication e) {
      e.printStackTrace();
    }
    int count = gambler.size();
    int count_new = rows-count;
       
    left.add(new JLabel());
    if(count>0){
      for(int i=0;i<count;i++){
        String gambler_name = gambler.get(i);
        try {
          gambler player = con.getGambler(gambler_name);
          left.add(new player_choose_entry(this,player.getId(),player.getName(),player.getMoney(),player.getStyle()));
        } catch (ProblemwithDataApplication e) {
          e.printStackTrace();
        }
      }
    }
    if(count_new>0)left.add(new player_choose_entry(this));
    left.add(new JLabel());
    con.shutdown();
    this.setVisible(false);
    this.setVisible(true);
  }
View Full Code Here

TOP

Related Classes of database.DatabaseConnection

Copyright © 2018 www.massapicom. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.