[java - swing]JTabbedPane et JSplitPane
Fermé
Salut, j'ai 2 petites questions sur lesquelles je bloque :
1) comment dans un JTabbedPane, faire pour afficher un onglet donner (j'ai 3 onglets et je voudrais par exemple afficher le 2eme onglet) ??
2)Comment faire dans un JSplitPane pour empecher l'utilisateur de redimensionner les 2 "parties" ??
merci
1) comment dans un JTabbedPane, faire pour afficher un onglet donner (j'ai 3 onglets et je voudrais par exemple afficher le 2eme onglet) ??
2)Comment faire dans un JSplitPane pour empecher l'utilisateur de redimensionner les 2 "parties" ??
merci
A voir également:
- [java - swing]JTabbedPane et JSplitPane
- Waptrick java football - Télécharger - Jeux vidéo
- Jeux java itel football - Télécharger - Jeux vidéo
- Java apk - Télécharger - Langages
- Waptrick java voiture - Télécharger - Jeux vidéo
- Java décompiler - Télécharger - Langages
2 réponses
choubaka
Messages postés
39425
Date d'inscription
jeudi 4 avril 2002
Statut
Modérateur
Dernière intervention
16 avril 2025
2 104
29 oct. 2005 à 10:42
29 oct. 2005 à 10:42
salut
1)
void setSelectedIndex(int)
void setSelectedComponent(Component)
Select the tab that has the specified component or index. Selecting a tab has the effect of displaying its associated component.
2)
là tu peux donner un valeur minimale, il est possible aussi de donner une valeur max ..
1)
void setSelectedIndex(int)
void setSelectedComponent(Component)
Select the tab that has the specified component or index. Selecting a tab has the effect of displaying its associated component.
2)
//Create a split pane with the two scroll panes in it. splitPane = new JSplitPane(JSplitPane.HORIZONTAL_SPLIT, listScrollPane, pictureScrollPane); splitPane.setOneTouchExpandable(true); splitPane.setDividerLocation(150); //Provide minimum sizes for the two components in the split pane Dimension minimumSize = new Dimension(100, 50); listScrollPane.setMinimumSize(minimumSize); pictureScrollPane.setMinimumSize(minimumSize);
là tu peux donner un valeur minimale, il est possible aussi de donner une valeur max ..
29 oct. 2005 à 11:27