Bonjour à tous
Bon j'ai un petit soucis si quelqu'un peut m'aider... Afficher un JTable avec deux JScrollPane Horizontale Verticale... Voilà le code...
Code : Sélectionner tout - Visualiser dans une fenêtre à part
1
2
3
4
5
6
7
8
9
10
11
12
13
14
T= new JTable(Cd); //Cd est un DefaultTableModel
		T.setRowHeight(25);
		T.getTableHeader().setPreferredSize(new Dimension(0, 60));
		T.setAutoscrolls(true);
		JScrollPane PV=new JScrollPane(T);
		PV.setEnabled(false);
		PV.setBackground(Color.WHITE);
		PV.setForeground(Color.WHITE);
		Container Pan = getContentPane();
		JScrollPane PH = new JScrollPane(T);
		PH.setHorizontalScrollBarPolicy(JScrollPane.HORIZONTAL_SCROLLBAR_NEVER);
		Pan.add(PH);
		Pan.add(PV);
		getContentPane().add(Pan, BorderLayout.CENTER);