|
|||||||
|
|
|
![]() |
|
|
Strumenti |
|
|
#1 |
|
Senior Member
Iscritto dal: Sep 2002
Città: Monza
Messaggi: 598
|
[java] sovrapposizione tra JComboBox e sotto
ciao amici,
una immagine vale molte parole è possibile evitare questo brutto effetto di sovrapposizione tra l'apertura di una jcomoBox e quello che c'è sotto? appure dovrei spostare l'apertura verso sopra, se possibile. grazie mille 1
__________________
Nunc est bibendum |
|
|
|
|
|
#2 |
|
Senior Member
Iscritto dal: May 2005
Città: Roma
Messaggi: 7938
|
__________________
My gaming placement |
|
|
|
|
|
#3 |
|
Senior Member
Iscritto dal: Sep 2002
Città: Monza
Messaggi: 598
|
Codice:
final JComboBox indirizzo;
indirizzo = new JComboBox();
indirizzo.setPreferredSize(new Dimension(350,25));
indirizzo.addItem("http://.ml");
indirizzo.addItem("http://...");
indirizzo.addItem("http://..s/");
indirizzo.setEditable(true);
help.setEditable(false);
pannelloCuore2.add(indirizzo);
....
....
PannelloChk.setPreferredSize(new Dimension(200,150));
PannelloChk.setLayout(new GridLayout(0,1));
JPanel sezione=new JPanel();
sezione.setLayout(new GridLayout(0,1));
sottosez.setVisible(false);
CheckboxGroup cbg = new CheckboxGroup();
tipoPredittore="classico";
final Checkbox chk = new Checkbox("form-->link-->....-->link-->PDB", cbg,true);
chk.setFocusable(false);
final Checkbox chk2 = new Checkbox("form-->email-->PDB", cbg,false);
chk.addItemListener(new ItemListener(){
public void itemStateChanged(ItemEvent arg0) {
tipoPredittore="classico";
sottosez.setVisible(false);
sottosez.setOpaque(false);
emailMittente.setEnabled(false);
emailMittente.setEditable(false);
}
});
sezione.add(chk);
CheckboxGroup cbga = new CheckboxGroup();
final Checkbox chk1a = new Checkbox("allegato file .pdb", cbga,true);
final Checkbox chk2a = new Checkbox("testo email = file.pdb", cbga,false);
final Checkbox chk3a = new Checkbox("testo email --> link --> file .pdb", cbga,false);
chk2.addItemListener(new ItemListener(){
public void itemStateChanged(ItemEvent arg0) {
sottosez.setVisible(true);
emailMittente.setEnabled(true);
emailMittente.setEditable(true);
tipoPredittore="email_allegato";
//sottoselezione
chk1a.addItemListener(new ItemListener(){
public void itemStateChanged(ItemEvent arg0) {
tipoPredittore="email_allegato";
}
});
chk2a.addItemListener(new ItemListener(){
public void itemStateChanged(ItemEvent arg0) {
tipoPredittore="email_testo";
}
});
chk3a.addItemListener(new ItemListener(){
public void itemStateChanged(ItemEvent arg0) {
tipoPredittore="email_link";
}
});
}
});
sezione.add(chk2);
sottosez.setPreferredSize(new Dimension(200,68));
sottosez.setLayout(new GridLayout(0,1));
//sottosez.add(new JLabel(" "));
sottosez.add(chk1a);
//sottosez.add(new JLabel(""));
sottosez.add(chk2a);
//sottosez.add(new JLabel(" "));
sottosez.add(chk3a);
PannelloChk.add(sezione);
PannelloChk.add(sottosez);
pannelloCuore2.add(PannelloChk);
PannelloChk.revalidate();
pannelloCuore2.revalidate();
__________________
Nunc est bibendum |
|
|
|
|
| Strumenti | |
|
|
Tutti gli orari sono GMT +1. Ora sono le: 16:04.



















