Probleme d'affichage JTextfield
j'ai un JPanel avec un gridLayout
dedans j'ajoute des JTextField et des JLabel et JRadioButton
d'autre apparaisse que si un JRadioButton est selectionne
http://christophe256.free.fr/image/avecJTetxfiel.PNG
sur le JTextField qui apparait je veux en changer le filtre en fonction du JRadioButton selectionné.
pour cela je declare un nouveau JTextfied avec le filtre en question :
Code:
1 2 3 4 5 6 7 8
|
FiltreFlottant filtrePercent = new FiltreFlottant(TAILLEPERCENT,0.0,50.0);
FiltreFlottant filtreValue = new FiltreFlottant(TAILLEVALUE,0.0,30000.0);
if(lastJRadioButtonUse.equals("%"))
valueOrPercent = new JTextField(filtrePercent,ZERO,TAILLEJTextField);
else
valueOrPercent = new JTextField(filtreValue,ZERO,TAILLEJTextField); |
et la le JTextField valueOrPercent n'apparait plus :cry:
http://christophe256.free.fr/image/sansJTetxfiel.PNG
le repaint ne change rien, j'ai fait un valueOrPercent.isVisible() qui me renvoie true.
voila je seche complement si quelqu'un a une idee je suis preneur