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 36 37 38 39
|
public class Ihm extends JFrame
{
private JTabbedPane feuilles = new JTabbedPane(SwingConstants.BOTTOM);
private JPanel feuilleTerritoires = new JPanel();
public Ihm()
{
super();
JTable jtt = new JTable(Ghm.getTableTerritoires());
//juste pour voir
this.setBackground(Color.YELLOW);
feuilleTerritoires.setBackground(Color.BLUE);
feuilles.setBackground(Color.GRAY);
jspt.setBackground(Color.RED);
jtt.setBackground(Color.GREEN);
feuilleTerritoires.add(jtt);
JScrollPane jspt = new JScrollPane(feuilleTerritoires);
feuilles.addTab("Territoires", feuilleTerritoires);
this.getContentPane().add(feuilles);
this.addWindowListener((new WindowAdapter()
{
public void windowClosing(WindowEvent e)
{
Actions.quitter() ;
}
} ));
this.setExtendedState (JFrame.MAXIMIZED_BOTH) ;
this.setVisible(true);
}
} |