1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35
   | public class MainClass extends JFrame{
 
  JTextField hostField;
 
  JTextField queryField;
 
  QueryTableModel qtm = new QueryTableModel();
 
 
  public MainClass() {
    setDefaultCloseOperation(EXIT_ON_CLOSE);
    setBounds(50,50,950,800);
    setTitle(" Contrôleur de Ticket   ");
 
     ..............(ici il ya tout ce qui est jpanel etc...)
 
 qtm.setHostURL(hostField.getText().trim());
    qtm.setQuery("select * from controle order by num_ticket");
}
 
  public static void main(String args[]) {
 
    try {
 
    	for (int i = 0; i < 4; i++) {
    		MainClass tt = new MainClass();
    	  	tt.setVisible(true);
     	  	Thread.sleep(5000);
 
    	}
      } catch (InterruptedException x) {
        }
}
 
} | 
Partager