Bonjour
Juste un point de détail que je voudrais régler. J'ai crée un JDialog contenant un JLabel et un JProgressBar. Désormais, tout se remplit bien, c'est impeccable. Cependant, j'aurais voulu rendre ce JDialog modal. Or, si je le rend modal, ma JProgressBar ne se remplit pas (????). Pour le moment, voici le constructeur de ma JDialog:
Cette solution est satisfaisante mais j'aurais souhaité rendre modal la JDialog malgré tout. Comment donc rendre modal ma JDialog tout en permettant sa JProgressBar de se remplir ?
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 private void initialize() { this.setSize(300, 200); this.setTitle("Processing"); this.getContentPane().add(getJContentPane()); this.pack(); java.awt.Frame []tab = Namek.getFrames(); java.awt.Frame main = tab[0]; this.setLocation((int)main.getLocation().getX()+((main.getWidth()/2)-150), (int)main.getLocation().getY()+((main.getHeight()/2)-100)); this.setDefaultCloseOperation(DISPOSE_ON_CLOSE); this.setResizable(false); this.setDefaultLookAndFeelDecorated(false); this.setAlwaysOnTop(true); this.setVisible(true); }
Merci d'avance.
@++
Partager