import java.awt.*; import oracle.dacf.layout.*; import oracle.jdeveloper.layout.*; import java.awt.event.*; public class TestLayoutFrame extends Frame { Label l_Name = new Label(); TextField tf_Name = new TextField(); Label l_PassWord = new Label(); TextField tf_PWord = new TextField(); GridBagLayout gridBagLayout1 = new GridBagLayout(); public TestLayoutFrame() { super(); try { jbInit(); } catch (Exception e) { e.printStackTrace(); } } private void jbInit() throws Exception { l_Name.setText(" Name"); l_PassWord.setText(" Password"); tf_PWord.setColumns(1); tf_PWord.addActionListener(new java.awt.event.ActionListener() { public void actionPerformed(ActionEvent e) { tf_PWord_actionPerformed(e); } }); this.setTitle("Frame Title"); this.setLayout(gridBagLayout1); this.setSize(new Dimension(400, 300)); this.setBackground(SystemColor.control); this.add(l_Name, new GridBagConstraints2(0, 0, 2, 1, 0.0, 0.0, GridBagConstraints.WEST, GridBagConstraints.NONE, new Insets(34, 4, 0, 0), 77, 5)); this.add(tf_Name, new GridBagConstraints2(2, 0, 1, 2, 1.0, 0.0, GridBagConstraints.CENTER, GridBagConstraints.NONE, new Insets(34, 23, 0, 81), 135, 10)); this.add(l_PassWord, new GridBagConstraints2(0, 2, 1, 1, 0.0, 0.0, GridBagConstraints.WEST, GridBagConstraints.NONE, new Insets(42, 4, 128, 0), 33, 10)); this.add(tf_PWord, new GridBagConstraints2(2, 2, 1, 1, 1.0, 0.0, GridBagConstraints.CENTER, GridBagConstraints.NONE, new Insets(41, 21, 126, 79), 139, 13)); } void tf_PWord_actionPerformed(ActionEvent e) { } }