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 40
| public ApplicationP (ApplicationC appCont) {
JFrame f= new JFrame();
Container contenu = f.getContentPane();
this.appc = appCont;
//backgrouund
panneau_fond = new BackgroundPanel(getClass().getResource("21.jpg"));
panneau_fond.setLayout(null);// pour pouvoir utilier setBounds
contenu.add(panneau_fond);
//panneau de l application : pApps, divisé en Nord, Centre et sud
JPanel pApps = new JPanel();
panneau_fond.add(pApps);
pApps.setBounds((int) bound_width, (int)bound_height, (int)width_apps, (int)height_apps);
pApps.setBackground(Color.cyan);
pApps.setLayout(new BorderLayout());
pNord = new JPanel();
pCentre = new JPanel();
pCentre.setLayout(new GridLayout(1,2));
pSud = new JPanel();
pSud.setLayout(new GridLayout(2,1));
pApps.add(pNord, BorderLayout.NORTH); //pNord.setBackground(Color.blue);
pApps.add(pCentre,BorderLayout.CENTER);//pCentre.setBackground(Color.white);
pApps.add(pSud,BorderLayout.SOUTH);//pSud.setBackground(Color.red);
f.setTitle("Bioinformatics basic tools");
f.setBounds( width/5, height/5, (int) width_fenetre, (int) height_fenetre);
//f.setResizable(false);
f.setVisible(true); |
Partager