co zrobić aby metoda getValue była dostępna dla drugiego panelu z guzikami i actionlistionerem?
public class FieldsPanel extends JPanel{
List fieldList = new ArrayList();
public static final int HEIGHT = 100;
public static final int WIDTH = 300;
public String getValue(int i){
return fieldList.get(i).getText();
}
public FieldsPanel(int x) {
setLayout(new GridLayout(x,x));
setPreferredSize(new Dimension(WIDTH, HEIGHT));
int a=0;
for(int i=0; i
public class FieldsPanel extends JPanel{
List fieldList = new ArrayList();
public static final int HEIGHT = 100;
public static final int WIDTH = 300;
public String getValue(int i){
return fieldList.get(i).getText();
}
public FieldsPanel(int x) {
setLayout(new GridLayout(x,x));
setPreferredSize(new Dimension(WIDTH, HEIGHT));
int a=0;
for(int i=0; i
#programowanie
@Arveit: ty się śmiejesz a ja męczę się z tym cholerstwem nie wiem jak długo, chodzi o to że mam zmienna ilość pól tekstowych, zależy ile użytkownik wklepie w zmienna, ale zawsze jest równa ilość w kolumnie,wierszu. ale jak dodam jeden klawisz to się wszystko #!$%@?... ;/