パネルに GridBagLayout を使用しています。ここに下の図のようにコンポーネントを追加したいのですが、Intern というラベルの下に Medication perscription というラベルを付けることができません。 誰でも方法を知っていますか?
GridBagLayout gridbaglayout = new GridBagLayout();
TGridBagConstraints constraints = new TGridBagConstraints();
northPanel = new WebPanel(gridbaglayout);
northPanel.setBorder(new EmptyBorder(5,5,5,5));
// *** PackComboBox row
constraints.setGxGyGwGhWxWyFillAnchor(0, 0, 1, 1, 0.0, 0.0, TGridBagConstraints.HORIZONTAL, TGridBagConstraints.NORTHWEST);
gridbaglayout.setConstraints(PackComboBox, constraints);
northPanel.add(FerPackComboBox);
constraints.setGxGyGwGhWxWyFillAnchor(1, 0, 1, 1, 0.0, 0.0, TGridBagConstraints.HORIZONTAL, TGridBagConstraints.NORTHWEST);
gridbaglayout.setConstraints(approveButton, constraints);
northPanel.add(approveButton);
constraints.setGxGyGwGhWxWyFillAnchor(2, 0, 1, 1, 0.0, 0.0, TGridBagConstraints.HORIZONTAL, TGridBagConstraints.NORTHWEST);
WebLabel internLabel = PrescriptionSummaryUtil.createCustomLabel("Intern",new Font("SansSerif",Font.BOLD,20),Color.decode("#ABB202").darker() );
gridbaglayout.setConstraints(internLabel, constraints);
northPanel.add(internLabel);
constraints.setGxGyGwGhWxWyFillAnchor(5, 0, 1, 1, 0.0, 0.0, TGridBagConstraints.HORIZONTAL, TGridBagConstraints.NORTHWEST);
gridbaglayout.setConstraints(patientInfoBox, constraints);
northPanel.add(patientInfoBox);
// *** Medication PerscriptionLabel row
constraints.setGxGyGwGhWxWyFillAnchor(1, 1, 2, 0, 0.0, 0.0, TGridBagConstraints.NORTHEAST, TGridBagConstraints.NORTHEAST);
WebLabel medicationPerscriptionLabel = PrescriptionSummaryUtil.createCustomLabel("Medication perscription",new Font("SansSerif",Font.BOLD,20),Color.decode("#ABB202").darker() );
gridbaglayout.setConstraints(medicationPerscriptionLabel, constraints);
northPanel.add(medicationPerscriptionLabel);