Gestion du contenu d'une fênetre suivant choix de l'utilisateur

argoth Messages postés 12 Date d'inscription vendredi 23 mai 2003 Statut Membre Dernière intervention 31 août 2007 - 16 juil. 2007 à 20:17
cs_GodConan Messages postés 2113 Date d'inscription samedi 8 novembre 2003 Statut Contributeur Dernière intervention 6 octobre 2012 - 17 juil. 2007 à 16:07
Bonjour,

Je débute en Java/J# ainsi qu'en utilisation d'interface graphique (je code en C/C++ sans GUI)
Mon problème est le suivant:

Je souhaite créer une simple application de gestion de réservation de salles en J# couplé à une BDD MySQL.
Les fonctionnalités du programmes sont les suivantes: Formulaire de réservation, Recherche de salle disponible et Ajout/Supprission de salles.

Afin d'éclaircir au maximun l'interface utilisateur, je souhaite qu'elle possède cette apparence:
http://argoth.free.fr/temp/Fenetreprincipale.jpg

Si l'utilisateur clique sur le premier bouton, un formulaire apparaît, sur le deuxième un formulaire de recherche et sur le troisième un formulaire d'ajout/suppression.

J'ai construi la première page à l'aide de Visual Studio J# dont le code est fournit plus bas.
Je souhaiterais supprimer le groupBox1 (deuxième cadre si dessus dans la fenetre) et afficher un autre groupBox(2) si l'utilisateur clique sur le 2eme bouton.

J'ai penser à mettre tout ce qui concernait la création du groupBox1 dans une fonction et faire un "groupBox1.Dispose()" si on clique sur un autre bouton que le 1er et appeler cette fonction pour reconstruire le groupBox1.

Le problème est que je n'arrive pas à savoir quel doivent être les élements qui doivent être présent dans cette fonction.
Est-ce la bonne méthode, si oui pouvez vous m'aider à le faire, après il sera de même pour les deux autre boutons.

Voici le code de la page:
package

 WindowsApplication1;
import

 System.Collections.Generic.*;
import

 System.Data.*;
import

 System.Drawing.*;
import

 System.ComponentModel.*;
import

 System.Windows.Forms.*;
/**

* Description r‚sum‚e de Form1.

*/

public

class
Form1
extends System.Windows.Forms.
Form{

private
Panel panel1;

private
Button button3;

private
Button button2;

private
Button button1;

private
Panel panel2;

private
Button button4;

private
GroupBox groupBox1;

private
Label label3;

private
Label label2;

private
Label label1;

private
RichTextBox richTextBox1;

private
Label label7;

private
Label label6;

private
Label label5;

private
Label label4;

private
TextBox textBox2;

private
TextBox textBox1;

private
ComboBox comboBox1;

private
ComboBox comboBox3;

private
ComboBox comboBox2;

private
TextBox textBox3;

private
Label label9;

private
Label label8;

private
NumericUpDown numericUpDown1;

private
DateTimePicker dateTimePicker1;

private
Label label10;

private
CheckBox checkBox3;

private
CheckBox checkBox2;

private
CheckBox checkBox1;

private
Button button6;

private
Button button5;

/*** Variable n‚cessaire au concepteur.

*/

private
System.ComponentModel.
IContainer components;

public Form1(){

//

// Requis pour la prise en charge du Concepteur Windows Form

//InitializeComponent();

//

// TODOÿ: ajoutez le code constructeur aprŠs l'appel InitializeComponent

//}

#region

 Code g‚n‚r‚ par le Concepteur Windows Form

/*** Nettoyage des ressources utilis‚es.

*/

protected
void Dispose(
boolean disposing){

if (disposing){

if (components != 
null){

components.Dispose();

}

}

super.Dispose(disposing);}

/*** M‚thode requise pour la prise en charge du concepteur - ne modifiez pas

* le contenu de cette m‚thode avec l'‚diteur de code.

*/

private
void InitializeComponent(){

this.panel1 = 
new
System.Windows.Forms.
Panel();

this.button4 = 
new
System.Windows.Forms.
Button();

this.button3 = 
new
System.Windows.Forms.
Button();

this.button2 = 
new
System.Windows.Forms.
Button();

this.button1 = 
new
System.Windows.Forms.
Button();

this.panel2 = 
new
System.Windows.Forms.
Panel();

this.groupBox1 = 
new
System.Windows.Forms.
GroupBox();

this.button6 = 
new
System.Windows.Forms.
Button();

this.button5 = 
new
System.Windows.Forms.
Button();

this.numericUpDown1 = 
new
System.Windows.Forms.
NumericUpDown();

this.dateTimePicker1 = 
new
System.Windows.Forms.
DateTimePicker();

this.label10 = 
new
System.Windows.Forms.
Label();

this.checkBox3 = 
new
System.Windows.Forms.
CheckBox();

this.checkBox2 = 
new
System.Windows.Forms.
CheckBox();

this.checkBox1 = 
new
System.Windows.Forms.
CheckBox();

this.textBox3 = 
new
System.Windows.Forms.
TextBox();

this.label9 = 
new
System.Windows.Forms.
Label();

this.label8 = 
new
System.Windows.Forms.
Label();

this.comboBox3 = 
new
System.Windows.Forms.
ComboBox();

this.comboBox2 = 
new
System.Windows.Forms.
ComboBox();

this.textBox2 = 
new
System.Windows.Forms.
TextBox();

this.textBox1 = 
new
System.Windows.Forms.
TextBox();

this.comboBox1 = 
new
System.Windows.Forms.
ComboBox();

this.richTextBox1 = 
new
System.Windows.Forms.
RichTextBox();

this.label7 = 
new
System.Windows.Forms.
Label();

this.label6 = 
new
System.Windows.Forms.
Label();

this.label5 = 
new
System.Windows.Forms.
Label();

this.label4 = 
new
System.Windows.Forms.
Label();

this.label3 = 
new
System.Windows.Forms.
Label();

this.label2 = 
new
System.Windows.Forms.
Label();

this.label1 = 
new
System.Windows.Forms.
Label();

this.panel1.SuspendLayout();

this.groupBox1.SuspendLayout();((

System.ComponentModel.
ISupportInitialize)(
this.numericUpDown1)).BeginInit();

this.SuspendLayout();

// 

// panel1

// 

this.panel1.get_Controls().Add(
this.button4);

this.panel1.get_Controls().Add(
this.button3);

this.panel1.get_Controls().Add(
this.button2);

this.panel1.get_Controls().Add(
this.button1);

this.panel1.get_Controls().Add(
this.panel2);

this.panel1.set_Location(
new
System.Drawing.
Point(2, 1));

this.panel1.set_Name(
"panel1");

this.panel1.set_Size(
new
System.Drawing.
Size(582, 43));

this.panel1.set_TabIndex(0);

// 

// button4

// 

this.button4.set_Location(
new
System.Drawing.
Point(377, 12));

this.button4.set_Name(
"button4");

this.button4.set_Size(
new
System.Drawing.
Size(75, 23));

this.button4.set_TabIndex(5);

this.button4.set_Text(
"Quitter");

this.button4.set_UseVisualStyleBackColor(
true);

this.button4.add_Click(
new
System.
EventHandler(
this.button4_Click));

// 

// button3

// 

this.button3.set_Location(
new
System.Drawing.
Point(295, 12));

this.button3.set_Name(
"button3");

this.button3.set_Size(
new
System.Drawing.
Size(75, 23));

this.button3.set_TabIndex(4);

this.button3.set_Text(
"Ajout/Suppression");

this.button3.set_UseVisualStyleBackColor(
true);

this.button3.add_Click(
new
System.
EventHandler(
this.button3_Click));

// 

// button2

// 

this.button2.set_Location(
new
System.Drawing.
Point(213, 12));

this.button2.set_Name(
"button2");

this.button2.set_Size(
new
System.Drawing.
Size(75, 23));

this.button2.set_TabIndex(3);

this.button2.set_Text(
"Recherche");

this.button2.set_UseVisualStyleBackColor(
true);

this.button2.add_Click(
new
System.
EventHandler(
this.button2_Click));

// 

// button1

// 

this.button1.set_Location(
new
System.Drawing.
Point(131, 11));

this.button1.set_Name(
"button1");

this.button1.set_Size(
new
System.Drawing.
Size(75, 23));

this.button1.set_TabIndex(2);

this.button1.set_Text(
"Reservation");

this.button1.set_UseVisualStyleBackColor(
true);

this.button1.add_Click(
new
System.
EventHandler(
this.button1_Click));

// 

// panel2

// 

this.panel2.set_Location(
new
System.Drawing.
Point(0, 49));

this.panel2.set_Name(
"panel2");

this.panel2.set_Size(
new
System.Drawing.
Size(279, 213));

this.panel2.set_TabIndex(1);

// 

// groupBox1

// 

this.groupBox1.get_Controls().Add(
this.button6);

this.groupBox1.get_Controls().Add(
this.button5);

this.groupBox1.get_Controls().Add(
this.numericUpDown1);

this.groupBox1.get_Controls().Add(
this.dateTimePicker1);

this.groupBox1.get_Controls().Add(
this.label10);

this.groupBox1.get_Controls().Add(
this.checkBox3);

this.groupBox1.get_Controls().Add(
this.checkBox2);

this.groupBox1.get_Controls().Add(
this.checkBox1);

this.groupBox1.get_Controls().Add(
this.textBox3);

this.groupBox1.get_Controls().Add(
this.label9);

this.groupBox1.get_Controls().Add(
this.label8);

this.groupBox1.get_Controls().Add(
this.comboBox3);

this.groupBox1.get_Controls().Add(
this.comboBox2);

this.groupBox1.get_Controls().Add(
this.textBox2);

this.groupBox1.get_Controls().Add(
this.textBox1);

this.groupBox1.get_Controls().Add(
this.comboBox1);

this.groupBox1.get_Controls().Add(
this.richTextBox1);

this.groupBox1.get_Controls().Add(
this.label7);

this.groupBox1.get_Controls().Add(
this.label6);

this.groupBox1.get_Controls().Add(
this.label5);

this.groupBox1.get_Controls().Add(
this.label4);

this.groupBox1.get_Controls().Add(
this.label3);

this.groupBox1.get_Controls().Add(
this.label2);

this.groupBox1.get_Controls().Add(
this.label1);

this.groupBox1.set_Location(
new
System.Drawing.
Point(2, 50));

this.groupBox1.set_Name(
"groupBox1");

this.groupBox1.set_Size(
new
System.Drawing.
Size(582, 511));

this.groupBox1.set_TabIndex(1);

this.groupBox1.set_TabStop(
false);

this.groupBox1.set_Text(
"Reservation d\'une salle");

this.groupBox1.add_Enter(
new
System.
EventHandler(
this.groupBox1_Enter));

// 

// button6

// 

this.button6.set_Location(
new
System.Drawing.
Point(295, 469));

this.button6.set_Name(
"button6");

this.button6.set_Size(
new
System.Drawing.
Size(75, 23));

this.button6.set_TabIndex(25);

this.button6.set_Text(
"Annuler");

this.button6.set_UseVisualStyleBackColor(
true);

this.button6.add_Click(
new
System.
EventHandler(
this.button6_Click));

// 

// button5

// 

this.button5.set_Location(
new
System.Drawing.
Point(204, 469));

this.button5.set_Name(
"button5");

this.button5.set_Size(
new
System.Drawing.
Size(75, 23));

this.button5.set_TabIndex(24);

this.button5.set_Text(
"Valider");

this.button5.set_UseVisualStyleBackColor(
true);

this.button5.add_Click(
new
System.
EventHandler(
this.button5_Click));

// 

// numericUpDown1

// 

this.numericUpDown1.set_Location(
new
System.Drawing.
Point(337, 377));

this.numericUpDown1.set_Name(
"numericUpDown1");

this.numericUpDown1.set_Size(
new
System.Drawing.
Size(52, 20));

this.numericUpDown1.set_TabIndex(23);

// 

// dateTimePicker1

// 

this.dateTimePicker1.set_Location(
new
System.Drawing.
Point(113, 129));

this.dateTimePicker1.set_Name(
"dateTimePicker1");

this.dateTimePicker1.set_Size(
new
System.Drawing.
Size(200, 20));

this.dateTimePicker1.set_TabIndex(22);

// 

// label10

// 

this.label10.set_AutoSize(
true);

this.label10.set_Location(
new
System.Drawing.
Point(104, 377));

this.label10.set_Name(
"label10");

this.label10.set_Size(
new
System.Drawing.
Size(213, 13));

this.label10.set_TabIndex(21);

this.label10.set_Text(
"Nombres de postes ayant besoins d\'Internet");

// 

// checkBox3

// 

this.checkBox3.set_AutoSize(
true);

this.checkBox3.set_Location(
new
System.Drawing.
Point(319, 345));

this.checkBox3.set_Name(
"checkBox3");

this.checkBox3.set_Size(
new
System.Drawing.
Size(87, 17));

this.checkBox3.set_TabIndex(20);

this.checkBox3.set_Text(
"Papperboard");

this.checkBox3.set_UseVisualStyleBackColor(
true);

// 

// checkBox2

// 

this.checkBox2.set_AutoSize(
true);

this.checkBox2.set_Location(
new
System.Drawing.
Point(213, 345));

this.checkBox2.set_Name(
"checkBox2");

this.checkBox2.set_Size(
new
System.Drawing.
Size(100, 17));

this.checkBox2.set_TabIndex(19);

this.checkBox2.set_Text(
"Vid‚oprojecteur");

this.checkBox2.set_UseVisualStyleBackColor(
true);

// 

// checkBox1

// 

this.checkBox1.set_AutoSize(
true);

this.checkBox1.set_Location(
new
System.Drawing.
Point(107, 345));

this.checkBox1.set_Name(
"checkBox1");

this.checkBox1.set_Size(
new
System.Drawing.
Size(99, 17));

this.checkBox1.set_TabIndex(18);

this.checkBox1.set_Text(
"R‚troprojecteur");

this.checkBox1.set_UseVisualStyleBackColor(
true);

// 

// textBox3

// 

this.textBox3.set_Location(
new
System.Drawing.
Point(182, 414));

this.textBox3.set_Name(
"textBox3");

this.textBox3.set_Size(
new
System.Drawing.
Size(207, 20));

this.textBox3.set_TabIndex(16);

// 

// label9

// 

this.label9.set_AutoSize(
true);

this.label9.set_Location(
new
System.Drawing.
Point(40, 414));

this.label9.set_Name(
"label9");

this.label9.set_Size(
new
System.Drawing.
Size(134, 13));

this.label9.set_TabIndex(15);

this.label9.set_Text(
"Adresse email de r‚ponse :");

// 

// label8

// 

this.label8.set_AutoSize(
true);

this.label8.set_Location(
new
System.Drawing.
Point(40, 345));

this.label8.set_Name(
"label8");

this.label8.set_Size(
new
System.Drawing.
Size(50, 13));

this.label8.set_TabIndex(14);

this.label8.set_Text(
"Besoins :");

// 

// comboBox3

// 

this.comboBox3.set_FormattingEnabled(
true);

this.comboBox3.set_Location(
new
System.Drawing.
Point(130, 207));

this.comboBox3.set_Name(
"comboBox3");

this.comboBox3.set_Size(
new
System.Drawing.
Size(99, 21));

this.comboBox3.set_TabIndex(13);

// 

// comboBox2

// 

this.comboBox2.set_FormattingEnabled(
true);

this.comboBox2.set_Location(
new
System.Drawing.
Point(130, 169));

this.comboBox2.set_Name(
"comboBox2");

this.comboBox2.set_Size(
new
System.Drawing.
Size(99, 21));

this.comboBox2.set_TabIndex(12);

// 

// textBox2

// 

this.textBox2.set_Location(
new
System.Drawing.
Point(148, 92));

this.textBox2.set_Name(
"textBox2");

this.textBox2.set_Size(
new
System.Drawing.
Size(392, 20));

this.textBox2.set_TabIndex(11);

// 

// textBox1

// 

this.textBox1.set_Location(
new
System.Drawing.
Point(165, 55));

this.textBox1.set_Name(
"textBox1");

this.textBox1.set_Size(
new
System.Drawing.
Size(256, 20));

this.textBox1.set_TabIndex(10);

// 

// comboBox1

// 

this.comboBox1.set_FormattingEnabled(
true);

this.comboBox1.set_Location(
new
System.Drawing.
Point(85, 24));

this.comboBox1.set_Name(
"comboBox1");

this.comboBox1.set_Size(
new
System.Drawing.
Size(121, 21));

this.comboBox1.set_TabIndex(9);

// 

// richTextBox1

// 

this.richTextBox1.set_Location(
new
System.Drawing.
Point(130, 250));

this.richTextBox1.set_Name(
"richTextBox1");

this.richTextBox1.set_Size(
new
System.Drawing.
Size(440, 81));

this.richTextBox1.set_TabIndex(8);

this.richTextBox1.set_Text(
"");

// 

// label7

// 

this.label7.set_AutoSize(
true);

this.label7.set_Location(
new
System.Drawing.
Point(39, 248));

this.label7.set_Name(
"label7");

this.label7.set_Size(
new
System.Drawing.
Size(79, 13));

this.label7.set_TabIndex(7);

this.label7.set_Text(
"Commentaires :");

// 

// label6

// 

this.label6.set_AutoSize(
true);

this.label6.set_Location(
new
System.Drawing.
Point(38, 209));

this.label6.set_Name(
"label6");

this.label6.set_Size(
new
System.Drawing.
Size(71, 13));

this.label6.set_TabIndex(5);

this.label6.set_Text(
"Heure de fin :");

// 

// label5

// 

this.label5.set_AutoSize(
true);

this.label5.set_Location(
new
System.Drawing.
Point(37, 172));

this.label5.set_Name(
"label5");

this.label5.set_Size(
new
System.Drawing.
Size(87, 13));

this.label5.set_TabIndex(4);

this.label5.set_Text(
"Heure de d‚but :");

// 

// label4

// 

this.label4.set_AutoSize(
true);

this.label4.set_Location(
new
System.Drawing.
Point(38, 129));

this.label4.set_Name(
"label4");

this.label4.set_Size(
new
System.Drawing.
Size(36, 13));

this.label4.set_TabIndex(3);

this.label4.set_Text(
"Date :");

// 

// label3

// 

this.label3.set_AutoSize(
true);

this.label3.set_Location(
new
System.Drawing.
Point(40, 95));

this.label3.set_Name(
"label3");

this.label3.set_Size(
new
System.Drawing.
Size(102, 13));

this.label3.set_TabIndex(2);

this.label3.set_Text(
"Objet de la r‚union :");

this.label3.add_Click(
new
System.
EventHandler(
this.label3_Click));

// 

// label2

// 

this.label2.set_AutoSize(
true);

this.label2.set_Location(
new
System.Drawing.
Point(38, 58));

this.label2.set_Name(
"label2");

this.label2.set_Size(
new
System.Drawing.
Size(121, 13));

this.label2.set_TabIndex(1);

this.label2.set_Text(
"Pr‚sident de la s‚ance :");

this.label2.add_Click(
new
System.
EventHandler(
this.label2_Click));

// 

// label1

// 

this.label1.set_AutoSize(
true);

this.label1.set_Location(
new
System.Drawing.
Point(39, 27));

this.label1.set_Name(
"label1");

this.label1.set_Size(
new
System.Drawing.
Size(36, 13));

this.label1.set_TabIndex(0);

this.label1.set_Text(
"Salle :");

this.label1.add_Click(
new
System.
EventHandler(
this.label1_Click_1));

// 

// Form1

// 

this.set_AutoScaleDimensions(
new
System.Drawing.
SizeF(6F, 13F));

this.set_AutoScaleMode(
System.Windows.Forms.
AutoScaleMode.Font);

this.set_ClientSize(
new
System.Drawing.
Size(584, 564));

this.get_Controls().Add(
this.panel1);

this.get_Controls().Add(
this.groupBox1);

this.set_Name(
"Form1");

this.set_Text(
"Gestion de reservations de salles");

this.add_Load(
new
System.
EventHandler(
this.Form1_Load));

this.panel1.ResumeLayout(
false);

this.groupBox1.ResumeLayout(
false);

this.groupBox1.PerformLayout();((

System.ComponentModel.
ISupportInitialize)(
this.numericUpDown1)).EndInit();

this.ResumeLayout(
false);}

#endregion

private
void button1_Click(
Object sender, 
System.
EventArgs e){

}

private
void button2_Click(
Object sender, 
System.
EventArgs e){

this.groupBox1.Dispose();}

private
void button3_Click(
Object sender, 
System.
EventArgs e){

}

private
void button4_Click(
Object sender, 
System.
EventArgs e){

System.exit(0);}

private
void button5_Click(
Object sender, 
System.
EventArgs e){

}

private
void button6_Click(
Object sender, 
System.
EventArgs e){

}

private
void Form1_Load(
Object sender, 
System.
EventArgs e){

}

private
void label1_Click(
Object sender, 
System.
EventArgs e){

}

private
void label2_Click(
Object sender, 
System.
EventArgs e){

}

private
void label3_Click(
Object sender, 
System.
EventArgs e){

}

private
void splitContainer1_Panel2_Paint(
Object sender, 
PaintEventArgs e){

}

private
void groupBox1_Enter(
Object sender, 
System.
EventArgs e){

}

private
void label1_Click_1(
Object sender, 
System.
EventArgs e){

}

}


merci de votre aide

11 réponses

cs_DARKSIDIOUS Messages postés 15814 Date d'inscription jeudi 8 août 2002 Statut Membre Dernière intervention 4 mars 2013 131
16 juil. 2007 à 20:21
Je me demande si tu trouvera beaucoup d'aide ici : sur un forum java, J# est tabou

En tout cas, je ne dirais qu'une seule chose : je suis bien content de faire du JAVA moi :
Microsoft."java" == BERK
0
cs_GodConan Messages postés 2113 Date d'inscription samedi 8 novembre 2003 Statut Contributeur Dernière intervention 6 octobre 2012 11
17 juil. 2007 à 09:22
J# berk... ;o) j en voi pas l interer ... de toute facn c est pour faire du .net alors autant rester au C++ .... ;o)
Et puis Site JAVA .... ;o) Pas de réponce pour toi ;o) hihi

++

GodConan ;o)
0
argoth Messages postés 12 Date d'inscription vendredi 23 mai 2003 Statut Membre Dernière intervention 31 août 2007
17 juil. 2007 à 10:05
c'était pour tester le Java/J# vais essayer sur un autre forum alors si c'est prohibé ici
0
cs_DARKSIDIOUS Messages postés 15814 Date d'inscription jeudi 8 août 2002 Statut Membre Dernière intervention 4 mars 2013 131
17 juil. 2007 à 10:30
C'est pas que c'est prohibé, c'est juste que je connais personne ici qui fait du J# ! (je me demande même si ca existe )

Quite à faire du java, autant faire du java de chez sun, et non du "java" à la sauce microsoft.

Essaye sur d'autres forums (il doit bien y avoir des forums spécialisés J# quand même...) car ici je te garantis pas que tu trouve des réponses.
0

Vous n’avez pas trouvé la réponse que vous recherchez ?

Posez votre question
CicinhoRaul Messages postés 221 Date d'inscription lundi 18 juin 2007 Statut Membre Dernière intervention 16 janvier 2009
17 juil. 2007 à 11:35
Salut,J'avoue ,il faudrait que tu essaies en java c mieux et plus pratique....tu ne peux vraiment pas changer de langage de prog?.

Je te dis ca car j'ai un projet du meme type à faire mais en JAVA.

Je dois faire un formulaire dont les données sont enregistrées dans un fichier texte.
0
argoth Messages postés 12 Date d'inscription vendredi 23 mai 2003 Statut Membre Dernière intervention 31 août 2007
17 juil. 2007 à 14:24
Si je peu le faire en java mais le dépoyement est plus simple en DotNet car pas de necessité de machine virtuelle.
Le fichier .exe gère les composants manquants et les télécharge tout seul.

Je pourrait le faire en Java mais le problème sera identique, comment rendre un groupbox ou encore combobox (en java) invisible pour en afficher une autre au même endoit ?
doit-on le détruire puis le reconstruire ? ou existe t-il une fonction du genre setVisible ?

ps moi c'est à un BDD et pas à un fichier texte que je veux l'interfacer mon prog :p

Je send que je vais finir par le faire en C# au lieu de J# :|
0
cs_GodConan Messages postés 2113 Date d'inscription samedi 8 novembre 2003 Statut Contributeur Dernière intervention 6 octobre 2012 11
17 juil. 2007 à 14:30
et bien en java tout est tres simple ;o) ... il y a les layout pour gerer l affichage des components dans les contenairs... ;o) hihi ... et avec un CardsLayout par exemple ;o) tu reussis sans probleme ce genre d ihm ...

GodConan ;o)
0
cs_DARKSIDIOUS Messages postés 15814 Date d'inscription jeudi 8 août 2002 Statut Membre Dernière intervention 4 mars 2013 131
17 juil. 2007 à 14:56
Oui, le problème avec J#, c'est que tu fais ton code an mode visuel, donc tu n'as guère la main sur le code qu'il génère : si tu l'avais fais en java, tu aurais certainement fait le code à la main, et tu aurais vite vu comment tu peux définir une interface dynamique où les contrôles sont crées selon telles ou telles contraintes.

Par contre, je ne suis absolument pas d'accord avec toi quand tu dit : le déploiement est plus simple car il ne nécessite pas de vm : .net comme java nécessite une vm, et pour le fichier .exe généré par J#, cela m'étonnerai fort qu'il télécharge et installe tout seul la vm, car pour se lancer, ben il faut que la vm soit déjà installée... A moins qu'il ne s'agisse d'un exe de setup qui lui est un programme non interprêté qui se charge de télécharger et installer les dépendances de ton application, mais là c'est bien autre chose !
0
cs_GodConan Messages postés 2113 Date d'inscription samedi 8 novembre 2003 Statut Contributeur Dernière intervention 6 octobre 2012 11
17 juil. 2007 à 15:43
Ca y est  ;o) tu t emportes ;o)

Pour résumer ;o) il n y a tout simplement pas plus portable que le Java ;o) hihi

GodConan ;o)
0
argoth Messages postés 12 Date d'inscription vendredi 23 mai 2003 Statut Membre Dernière intervention 31 août 2007
17 juil. 2007 à 15:43
Il s'agit bien d'un setup qui récupère les composants .Net s'ils ne sont pas présent directement sur le site de microsoft.

Tu me dira dans les deux cas il faut télécharger un composant VM/Frameworks .NET mais ce dernier est plus présent sur une machine (Microsoft Update).

D'après ce que j'ai lu en Java via SWT ou Swing, le system est le même: une Jframe/Windows.form, des panels JPanel (ou Panel) /Panel et des JButon/Button etc...

Mon problème existerai également en Java, faut-il construire ces bouttons,Jtexte,... dans un panel ou un combobox?
 Et comment faire pour afficher ou cacher l'ensemble ?
Faut-il créer une fonction qui les construit et les ajoute au conteneur et placer cette fonction dans le constructeur puis détruire et recréer autant de ffois que voulu ou y a t-il un moyen de juste les rendre invisible (tout le contenu du combobox ou panel) pour après les réafficher ?
Dois-je passer par un Layout pour cela ?
0
cs_GodConan Messages postés 2113 Date d'inscription samedi 8 novembre 2003 Statut Contributeur Dernière intervention 6 octobre 2012 11
17 juil. 2007 à 16:07
En fait je pense que tu ne lis pas toutes les réponce que l on te fait... ;o) il est vrai  ;o) qu il y a de la litérature ...

GodConan ;o)
0
Rejoignez-nous