A propos de l'agrandissement des fenetres

Fermé
killpatron - Modifié par NHenry le 7/08/2016 à 16:59
 killpatron - 7 août 2016 à 21:19
Bonjour,

voici le code qui affiche 7 fenetres successives et alignement vertical a gauche d'une fenetre principale.Elles sont petites .Je veux les agrandir et les espacer.Comment je fais?
Merci d'avance.
package com.stock_mp;
import java.awt.BorderLayout;

import javax.swing.JEditorPane;
import javax.swing.JFrame;
import javax.swing.JScrollPane;
import javax.swing.JTabbedPane;
import javax.swing.event.ChangeEvent;
import javax.swing.event.ChangeListener;


public class PageMP extends JFrame {
 
 
 private static final long serialVersionUID = 1L;
 private JEditorPane editorPane, apercu;
 private JTabbedPane onglet = new JTabbedPane(JTabbedPane.LEFT);
 
 public PageMP(){
  
  this.setSize(1000, 700);
  this.setTitle("MOUVEMENT MATIERE PREMIERE");
  this.setLocationRelativeTo(null);
  this.setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE);
  
  editorPane = new JEditorPane();
  editorPane.setText(" <HTML><HEAD></HEAD><BODY></BODY></HTML> ");
  apercu = new JEditorPane();
  apercu.setEditable(false);
  onglet.addTab("MVT Matiere", new JScrollPane(editorPane));
  onglet.addTab("Etat MP", new JScrollPane(apercu));
  
  
  onglet.addTab("Etat Inventaire MP", new JScrollPane(apercu));
  onglet.addTab("Etat des Arrivages", new JScrollPane(apercu));
  onglet.addTab("Fiche Creation d'article", new JScrollPane(apercu));
  onglet.addTab("Fiche Creation Fournisseur", new JScrollPane(apercu));
  onglet.addTab("Actualisation des couts", new JScrollPane(apercu));
  onglet.addChangeListener(new ChangeListener(){

   @Override
   public void stateChanged(ChangeEvent arg0) {
    // TODO Auto-generated method stub
    
   }
  });

  this.getContentPane().add(onglet, BorderLayout.CENTER);
  this.setVisible(true);
 }
 
 
}


1 réponse

KX Messages postés 16733 Date d'inscription samedi 31 mai 2008 Statut Modérateur Dernière intervention 31 janvier 2024 3 015
7 août 2016 à 17:11
Bonjour,

"Elles sont petites .Je veux les agrandir et les espacer."
De quoi tu parles, quel résultat veux-tu obtenir ?
Pour l'instant la fenêtre est plutôt bien dimensionnée je trouve.

0
Bonjour,je parle des fenetres MVT matiere,ETAT MP.................jusqu'a la fenetre:Actualisation des couts.Je veux qu'elles occupent tout l'espace gauche si possible.
0