0
私は3を作ろうとしていますJOptionPane
。それぞれは何らかのデータの配列を表示する必要があります。別のJOptionPaneで別の配列を表示する方法
firstDataArray
の20情報を表示しなければならない最初の場合にのみ、私は新しいJOptionPane
は、それがsecondDataArrayなどの情報を表示する必要がありますポップアップ表示したいキャンセルにユーザーがクリック...
問題I最初JOptionPane
にキャンセルのユーザーのクリック、セカンドJOptionPane
はfirstDataArrayとsecondDataArrayの全ての情報を表示しているとき、キャンセル時に「Mの対面は同じ
JOptionPane
を分離したい)
です2番目のJOptionPane
の底、3番目のJoptionPane
は3つのデータのすべての情報を表示します。
私は間違っていますか?
多くの感謝、
ベース
String[] firstDataArray= new String[20];
String[] secondDataArray= new String[20];
String[] thirdDataArray= new String[20];
firstDataArray= ClassA.getFirstData();
secondDataArray= ClassA.getSecondData();
thirdDataArray= ClassA.getThirdData();
StringBuilder textRegion = new StringBuilder();
String txt = JOptionPane.showInputDialog(null,
textRegion.append(Arrays.toString(firstDataArray).replace("[", "").replace("]", "").replace(",", "")).append('\n'), "Choose Option)",
JOptionPane.PLAIN_MESSAGE);
//If the user click cancel , show the other array in a new JoptionPane
if (txt == null) {
txt = JOptionPane.showInputDialog(null,
textRegion.append(Arrays.toString(secondDataArray).replace("[", "").replace("]", "").replace(",", "")).append('\n'), "Choisir municipalite (Chose option)",
JOptionPane.PLAIN_MESSAGE);
//If the user click cancel again , show the other array in a third JoptionPane
if (txt == null) {
txt = JOptionPane.showInputDialog(null,
textRegion.append(Arrays.toString(thirdDataArray).replace("[", "").replace("]", "").replace(",", "")).append('\n'), "Chose Option)",
JOptionPane.PLAIN_MESSAGE);
if (txt == null) {
} else {
setNomMunicipalite(txt);
}
} else {
setNomMunicipalite(txt);
}
} else {
setNomMunicipalite(txt);
}
ohhhhのための新しいものを使用してください! – napi15
@ napi15喜んで助けてください。 :-) – RubioRic