Zu gridbaglayout

halli hallo

ich habe ein problem… (natürlich…)

ich habe verschiedene Kompnenten auf einem Jpanel mit dem gridbaglayout angeordnet und stosse gerade auf folgende, mir schier unlösbare aufgabe:

ich ordne links ein Element an, darunter mehre kleinere. so, jetzt will ich rechts vom ganzen ein anderes element platzieren, dass soll von der höhe aber mit dem zuerst gesetzten anfangen…
ich fummle hier schon doof rum, kriege das aber nicht hin.
bin totttttttal dankbar für hilfe…

Es hilft immer ungemein, wenn Du Deinen bereits bestehenden Quelltext ordentlich formatiert mitpostest.

Ich rate jetzt ins Blaue hinein: Du hast gridx bzw gridy nicht richtig gesetzt. Und jetzt zitiere ich komplett aus http://java.sun.com/docs/books/tutorial/uiswing/layo…

gridx, gridy

Specify the row and column at the upper left of the component. The leftmost column has address gridx=0 and the top row has address gridy=0. Use GridBagConstraints.RELATIVE (the default value) to specify that the component be placed just to the right of (for gridx) or just below (for gridy) the component that was added to the container just before this component was added. We recommend specifying the gridx and gridy values for each component rather than just using GridBagConstraints.RELATIVE; this tends to result in more predictable layouts.

gridwidth, gridheight

Specify the number of columns (for gridwidth) or rows (for gridheight) in the component’s display area. These constraints specify the number of cells the component uses, not the number of pixels it uses. The default value is 1. Use GridBagConstraints.REMAINDER to specify that the component be the last one in its row (for gridwidth) or column (for gridheight). Use GridBagConstraints.RELATIVE to specify that the component be the next to last one in its row (for gridwidth) or column (for gridheight). We recommend specifying the gridwidth and gridheight values for each component rather than just using GridBagConstraints.RELATIVE and GridBagConstraints.REMAINDER; this tends to result in more predictable layouts.