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);
}