0
我想知道如何動態改變形式的搜索後後動態地改變一種形式,我有:如何搜索CodenameOne
被點擊的多鍵bbb2Form hi = new Form("Soggetti");
BoxLayout b=new BoxLayout(BoxLayout.Y_AXIS);
TableLayout ttt=new TableLayout(10,1);
int ttt_height=20;
ttt.setDefaultRowHeight(ttt_height);
ttt.setDefaultColumnWidth(100);
hi.setLayout(ttt);
MultiButton bbb=new MultiButton();
bbb.setTextLine1("Soggetto 1");
bbb.setTextLine2("Dettagli ");
bbb.setIcon(i);
bbb.setEmblem(s);
MultiButton bbb2=new MultiButton();
bbb2.setTextLine1("Soggetto 1");
bbb2.setTextLine2("Dettagli ");
bbb2.setIcon(i);
bbb2.setEmblem(s);
MultiButton bbb3=new MultiButton();
bbb3.setTextLine1("Soggetto 1");
bbb3.setTextLine2("Dettagli ");
bbb3.setIcon(i);
bbb3.setEmblem(s);
bbb2.addActionListener(new ActionListener(){
@Override
public void actionPerformed(ActionEvent evt) {
int p=1;
p++;
// TODO Auto-generated method stub
// bbb3.setVisible(true);
hi.removeAll();
//hi = new Form("Soggetti");
BoxLayout b=new BoxLayout(BoxLayout.Y_AXIS);
TableLayout ttt=new TableLayout(10,1);
int ttt_height=5;
ttt.setDefaultRowHeight(ttt_height);
ttt.setDefaultColumnWidth(100);
hi.setLayout(ttt);
//ci ricreiamo i i bottoni precedenti
hi.addComponent(bbb);
hi.addComponent(bbb2);
ArrayList<LinkedHashMap> alhm= Ricerca("");
Label contatto=null;
for(int j=0;j<alhm.size();j++){
LinkedHashMap s=alhm.get(j);
String nome=(String) s.get("firstName");
String cognome=(String) s.get("lastName");
String numero =(String) s.get("numero");
contatto=new Label(nome+" "+cognome+" "+numero);
Double id= (Double) s.get("id");
hi.addComponent(contatto);
}
hi.addComponent(bbb3);
// SchermataRubrica sr=new SchermataRubrica();
// sr.getSchermata();
hi.show();
}
});
hi.addComponent(bbb);
hi.addComponent(bbb2);
hi.addComponent(bbb3);
hi.addCommand(Schermata1);
hi.addCommand(Schermata2);
hi.addCommand(Schermata3);
hi.show();
當我要出現如下結果那多鍵而是它搞砸了一切可能......我失去了一些東西在邏輯電平... 謝謝
謝謝謝,我會試試,我想感謝你給我的所有答案和提示......你arr真棒 – Lorenzo