Hello,

J ai un petit soucie avec une fenetre de type jdialog, celle-ci s'affiche bien mais ne comporte pas de contenu (en gros le label n est pas afficher)

voici le code de ma classe

Code : Sélectionner tout - Visualiser dans une fenêtre à part
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
 
package com.odcgroup.message.ui.dialog;
 
import org.eclipse.swt.SWT;
import org.eclipse.swt.layout.GridLayout;
import org.eclipse.swt.widgets.Dialog;
import org.eclipse.swt.widgets.Display;
import org.eclipse.swt.widgets.Label;
import org.eclipse.swt.widgets.Shell;
/**
 * The search dialog box, used to search messages
 * 
 * @author Alexandre Jaquet
 */
public class SearchDialog extends Dialog {
 
	/** The shell*/
	private Shell dialog;
	/** The result. */
	private String result;
 
 
	/**
         * Creates a new SearchDialog.
         * 
         * @param parent
         *            The parent Control
         * @param languages
         *            The available languages
         */
	public SearchDialog(Shell parent, String[] languages) {
		super(parent, SWT.APPLICATION_MODAL);
	}
 
	/**
         * Opens the Dialog box.
         * 
         * @return String The result
         */
	public String open() {
		Shell parent = getParent();
		dialog = new Shell(parent, SWT.DIALOG_TRIM | SWT.APPLICATION_MODAL);
		dialog.setText("Search translation");
		createContents(parent);
		dialog.setSize(500, 500);		
        	dialog.setMinimumSize(450, 450);
        	dialog.pack();
    	        dialog.open();
		Display display = parent.getDisplay();
		while (!dialog.isDisposed()) {
			if (!display.readAndDispatch()) {
				display.sleep();
			}
		}
		return result;
	}
	/**
         * Create the fields of the search dialog box
         * 
         * @param parent
         *                      The parent component
         */
	public void createContents(final Shell shell) {
           Label l = new Label(shell,SWT.NONE);
    	   l.setText("BOM Selection");
    	   l.setBounds(0,0,100,20);
	}
}
merci