modifica funzione caricaPannello
rimosso JPanel
This commit is contained in:
parent
02e6cdb77c
commit
d66fd9c45b
@ -2210,10 +2210,10 @@ public class PuntoCassa extends JFrame implements ActionListener {
|
||||
menuGiornoPresente = true;
|
||||
sql = sql + sql2;
|
||||
}
|
||||
JPanel pnl = this.pnlProdotti;
|
||||
//JPanel pnl = this.pnlProdotti;
|
||||
var listaBottoni = new ArrayList<JToggleButton>();
|
||||
|
||||
pnl.setLayout(new GridLayout(6, 5, 1, 1));
|
||||
pnl.removeAll();
|
||||
|
||||
for (Integer r = 0; r < 6; r++) {
|
||||
Color c2 = new Color(255, 153, 255);
|
||||
switch (r) {
|
||||
@ -2269,7 +2269,8 @@ public class PuntoCassa extends JFrame implements ActionListener {
|
||||
bt.addActionListener(this);
|
||||
bt.setVisible(true);
|
||||
|
||||
pnl.add(bt);
|
||||
//this.pnlProdotti.add(bt);
|
||||
listaBottoni.add(bt);
|
||||
np++;
|
||||
if (np == 5) {
|
||||
break;
|
||||
@ -2298,7 +2299,8 @@ public class PuntoCassa extends JFrame implements ActionListener {
|
||||
bt.setVerticalTextPosition(SwingConstants.TOP);
|
||||
bt.addActionListener(this);
|
||||
bt.setVisible(true);
|
||||
pnl.add(bt);
|
||||
//this.pnlProdotti.add(bt);
|
||||
listaBottoni.add(bt);
|
||||
}
|
||||
rs.close();
|
||||
st.close();
|
||||
@ -2309,9 +2311,16 @@ public class PuntoCassa extends JFrame implements ActionListener {
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
this.revalidate();
|
||||
this.repaint();
|
||||
this.pnlProdotti.setLayout(new GridLayout(6, 5, 1, 1));
|
||||
this.pnlProdotti.removeAll();
|
||||
for(JToggleButton bt : listaBottoni){
|
||||
this.pnlProdotti.add(bt);
|
||||
}
|
||||
|
||||
this.pnlProdotti.revalidate();
|
||||
this.pnlProdotti.repaint();
|
||||
//this.revalidate();
|
||||
//this.repaint();
|
||||
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user