I came accross this code where Grid constraints are having negative row and column values. What does it signify?
GridBagConstraints cons = new GridBagConstraints();
cons.gridx = 0;
cons.gridy = -2;
cons.gridwidth = 0;
cons.gridheight = 1;
cons.anchor = 10;
cons.fill = 0;
Negative values for
gridxandgridyindicate relative positioning, i.e. the component is placed just to the right of the component added before (forgridx) or just below the component (forgridy).You should not use negative values directly but
GridBagConstraints.RELATIVEinstead.