Rafraichir un JDialog

Rafraichir un JDialog - Java - Programmation

Marsh Posté le 09-11-2003 à 17:40:25    

Bien tout d'abord, j'ai trouvé trois posts à ce sujet, mais je n'arrive toujours pas à regler le problème suivant.
 
J'ai un JDialog avec deux panel. Dans l'un deux combobox et l'autre est un diagramme (en fait un Jpanel car extends JPanel)
 
lorsque je modifie les valeurs de mes combo box, l'autre panel doit se redessiner. Et ca ne marche pas...
J'ai testé jdialog.validate() ou .repaint()
mais aussi jpanel.validate ou .repaint()
 
Merci de m'eclairer sur ce point
 
Voici la méthode associé  lécouteur de l'un de mes combo.
(DatPlotChart est le diagramme (JPanel)

Code :
  1. void updateX(ActionEvent e) {
  2.        int x =  (new Integer( ((String) bandX.getSelectedItem()))).intValue();
  3.        int y =  (new Integer( ((String) bandY.getSelectedItem()))).intValue();
  4.        DatPlotChart = new DataPlotChart(data,imgbands, x, y);
  5.        this.DatPlotChart.validate();
  6.        this.DatPlotChart.repaint();
  7.        this.validate();
  8.        this.update(this.getGraphics());
  9.        this.repaint();
  10. }


 
 
 
Merci!

Reply

Marsh Posté le 09-11-2003 à 17:40:25   

Reply

Marsh Posté le 09-11-2003 à 18:08:56    

jpanel.revalidate() ?

Reply

Marsh Posté le 10-11-2003 à 10:29:36    

Krueger a écrit :

jpanel.revalidate() ?


 
:'(

Reply

Sujets relatifs:

Leave a Replay

Make sure you enter the(*)required information where indicate.HTML code is not allowed