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;
|
menuGiornoPresente = true;
|
||||||
sql = sql + sql2;
|
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++) {
|
for (Integer r = 0; r < 6; r++) {
|
||||||
Color c2 = new Color(255, 153, 255);
|
Color c2 = new Color(255, 153, 255);
|
||||||
switch (r) {
|
switch (r) {
|
||||||
@ -2269,7 +2269,8 @@ public class PuntoCassa extends JFrame implements ActionListener {
|
|||||||
bt.addActionListener(this);
|
bt.addActionListener(this);
|
||||||
bt.setVisible(true);
|
bt.setVisible(true);
|
||||||
|
|
||||||
pnl.add(bt);
|
//this.pnlProdotti.add(bt);
|
||||||
|
listaBottoni.add(bt);
|
||||||
np++;
|
np++;
|
||||||
if (np == 5) {
|
if (np == 5) {
|
||||||
break;
|
break;
|
||||||
@ -2298,7 +2299,8 @@ public class PuntoCassa extends JFrame implements ActionListener {
|
|||||||
bt.setVerticalTextPosition(SwingConstants.TOP);
|
bt.setVerticalTextPosition(SwingConstants.TOP);
|
||||||
bt.addActionListener(this);
|
bt.addActionListener(this);
|
||||||
bt.setVisible(true);
|
bt.setVisible(true);
|
||||||
pnl.add(bt);
|
//this.pnlProdotti.add(bt);
|
||||||
|
listaBottoni.add(bt);
|
||||||
}
|
}
|
||||||
rs.close();
|
rs.close();
|
||||||
st.close();
|
st.close();
|
||||||
@ -2309,9 +2311,16 @@ public class PuntoCassa extends JFrame implements ActionListener {
|
|||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
this.pnlProdotti.setLayout(new GridLayout(6, 5, 1, 1));
|
||||||
this.revalidate();
|
this.pnlProdotti.removeAll();
|
||||||
this.repaint();
|
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