[java - swing]JTabbedPane et JSplitPane
pierro
-
sousouna -
sousouna -
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 - Télécharger - Jeux vidéo
- Eclipse java - Télécharger - Langages
- Java apk - Télécharger - Langages
- Waptrick java voiture - Télécharger - Jeux vidéo
2 réponses
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 ..
pierro
Je te remercie ca marche impec ! :-)