setLocation of Label
Ich habe alle Beschriftungen korrekt ausgeführt, aber die Position der userLabel [3] ist nicht korrekt. Egal, was ich tue, die Beschriftung "Farbe:" wird auf dem Rahmen immer mit einer x-Koordinate von 0 und einer y-Koordinate angezeigt auf halber Strecke.
JLabel[] userLabel = new JLabel[4];
for(int p = 0; p < userLabel.length; p++){
userLabel[p] = new JLabel();
userLabel[p].setSize(100,50);
frameSetUp.add(userLabel[p]);
}
userLabel[0].setText("Width of Frame:");
userLabel[1].setText("Height of Frame:");
userLabel[2].setText("# OF Balls:");
userLabel[3].setText("Color:");
userLabel[0].setLocation(10,35);
userLabel[1].setLocation(10,85);
userLabel[2].setLocation(10,135);
userLabel[3].setLocation(0,0); //no matter what coordinates I change this too, it wont reposition
Image: [IMG] http://i41.tinypic.com/23jfo9l.png [/ IMG]http://i41.tinypic.com/23jfo9l.png