scrollable JPAnel et smooth transition
This commit is contained in:
parent
5116d7a998
commit
0eabe2b4bb
@ -47,10 +47,10 @@ public class Model{
|
||||
this.fenetre.setSize(1200, 720);
|
||||
this.fenetre.setLocation(100,100);
|
||||
this.fenetre.addWindowListener(new ObservateurFenetre());
|
||||
this.fenetre.setLayout(new GridLayout(1,2));
|
||||
this.fenetre.setLayout(new GridLayout(2,1));
|
||||
this.fenetre.setDefaultCloseOperation(JFrame.DISPOSE_ON_CLOSE);
|
||||
this.fenetre.add(this.fenGr);
|
||||
this.fenetre.add(this.fenEtu);
|
||||
this.fenetre.add(new JScrollPane(this.fenGr));
|
||||
this.fenetre.add(new JScrollPane(this.fenEtu));
|
||||
this.fenetre.setVisible(true);
|
||||
}
|
||||
|
||||
@ -162,18 +162,11 @@ public class Model{
|
||||
}
|
||||
|
||||
public void showGroupe(Groupe g){
|
||||
this.fenetre.dispose();
|
||||
this.fenGr=new FenetreGroupe(g, this);
|
||||
this.fenEtu=new FenetreEtudiant(g);
|
||||
|
||||
this.fenetre=new JFrame();
|
||||
this.fenetre.setSize(1200, 720);
|
||||
this.fenetre.setLocation(100,100);
|
||||
this.fenetre.addWindowListener(new ObservateurFenetre());
|
||||
this.fenetre.setLayout(new GridLayout(1,2));
|
||||
this.fenetre.setDefaultCloseOperation(JFrame.DISPOSE_ON_CLOSE);
|
||||
this.fenetre.add(this.fenGr);
|
||||
this.fenetre.add(this.fenEtu);
|
||||
this.fenetre.setVisible(true);
|
||||
this.fenetre.getContentPane().removeAll();
|
||||
this.fenetre.add(new JScrollPane(this.fenGr));
|
||||
this.fenetre.add(new JScrollPane(this.fenEtu));
|
||||
this.fenetre.revalidate();
|
||||
}
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user