Setting Grid Bag Layout Constraints

Hi any body can tell me whether the following gridbag constraints are correct or wrong in the java class.
My problem is that the two butons (cancel and submit) are not displayed i am using Eclipse Ide Visual editor 2.1.
Please any body can help me out if there are any changes to be done .
* Created on May 25, 2004
* To change the template for this generated file go to
* Window>Preferences>Java>Code Generation>Code and Comments
package demo;
import java.awt.*;
import javax.swing.border.*;
import java.awt.event.*;
import java.util.*;
import javax.swing.*;
import javax.swing.table.*;
import javax.swing.JMenuBar;
import javax.swing.JPanel;
import javax.swing.JLabel;
import javax.swing.JTextField;
import javax.swing.JButton;
import javax.swing.JFrame;
* @author kv5459
* To change the template for this generated type comment go to
* Window>Preferences>Java>Code Generation>Code and Comments
public class DataBase extends JFrame {
     private javax.swing.JPanel jContentPane = null;
     JPanel XXqqds_GridField2;
     JPanel XXqqds_GridField3;
     JLabel XXqqds_TextGraphic4;
     JTextField XXqqds_DataField5;
     JLabel XXqqds_TextGraphic6;
     JTextField XXqqds_DataField7;
     JPanel XXqqds_GridField8;
JButton XXqqds_PushButton9;
     JButton XXqqds_PushButton10;
     * This is the default constructor
     public DataBase() {
          super();
          initialize();
     * This method initializes this
     * @return void
     private void initialize() {
          this.setSize(500, 375);
          this.setContentPane(getJContentPane());
          setTitle("");
          setLocale(java.util.Locale.getDefault());
          setResizable(true);
          setState(Frame.NORMAL);
          setSize(500,375);
          setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE);
          setVisible(true);
     * This method initializes jContentPane
     * @return javax.swing.JPanel
     private javax.swing.JPanel getJContentPane() {
          if (jContentPane == null) {
               jContentPane = new javax.swing.JPanel();
               jContentPane.setLayout(null);
          XXqqds_GridField2= new JPanel();
          XXqqds_GridField2.setBackground(getContentPane().getBackground());
          XXqqds_GridField2.setForeground(getContentPane().getForeground());
          XXqqds_GridField2.setLayout(new GridBagLayout());
          jContentPane.add(XXqqds_GridField2);
          XXqqds_GridField3= new JPanel();
          XXqqds_GridField3.setBackground(XXqqds_GridField2.getBackground());
          XXqqds_GridField3.setForeground(XXqqds_GridField2.getForeground());
          XXqqds_GridField3.setLayout(new GridBagLayout());
          XXqqds_GridField3.setBounds(new Rectangle(0,0,175,39));
          GridBagConstraints c1 = new GridBagConstraints();
          c1.gridx = 0;
          c1.gridy = 0;c1.gridwidth = 2;
          c1.anchor = java.awt.GridBagConstraints.CENTER;
          c1.weightx=0;c1.weighty=0;
          c1.fill = java.awt.GridBagConstraints.NONE;
          XXqqds_GridField3.setPreferredSize(new java.awt.Dimension(205,192));
          c1.ipadx = 0;c1.ipady = 0;
          XXqqds_TextGraphic4= new JLabel();
          XXqqds_TextGraphic4.setText("Name");
          XXqqds_TextGraphic4.setBackground(XXqqds_GridField3.getBackground());
          XXqqds_TextGraphic4.setForeground(XXqqds_GridField3.getForeground());
          XXqqds_TextGraphic4.setBounds(new Rectangle(13,2,49,15));
          GridBagConstraints c2 = new GridBagConstraints();
          c2.gridx=0;
          c2.gridy=0;
          c2.gridwidth=1;c2.gridheight=1;
          c2.anchor = java.awt.GridBagConstraints.NORTHWEST;
          c2.weightx = 0.0D;c2.weighty = 1.0D;
          c2.ipadx=0;c2.ipady=0;
          c2.fill = java.awt.GridBagConstraints.NONE;
          c2.insets = new java.awt.Insets(10,20,0,0);
          XXqqds_DataField5= new JTextField();
          XXqqds_DataField5.setBackground(new Color(255,255,255));
          XXqqds_DataField5.setForeground(XXqqds_GridField3.getForeground());
          XXqqds_DataField5.setBounds(new Rectangle(77,0,122,19));
          XXqqds_DataField5.setHorizontalAlignment(SwingConstants.LEADING);
          GridBagConstraints c3 = new GridBagConstraints();
          c3.gridx=1;
          c3.gridy=0;
          c3.gridwidth=1;c3.gridheight=1;
          c3.anchor = java.awt.GridBagConstraints.NORTH;
          c3.weightx=0;c3.weighty = 0.0D;
          c3.ipadx = 0;c3.ipady=0;
          c3.insets = new java.awt.Insets(10,0,0,5);
          XXqqds_DataField5.setPreferredSize(new java.awt.Dimension(117,20));
          XXqqds_GridField2.setSize(275, 192);
          XXqqds_GridField2.setLocation(96, 15);
          c3.fill=GridBagConstraints.HORIZONTAL;
          XXqqds_TextGraphic6= new JLabel();
          XXqqds_TextGraphic6.setText("Password");
          XXqqds_TextGraphic6.setBackground(XXqqds_GridField3.getBackground());
          XXqqds_TextGraphic6.setForeground(XXqqds_GridField3.getForeground());
          XXqqds_TextGraphic6.setBounds(new Rectangle(0,24,77,15));
          GridBagConstraints c4 = new GridBagConstraints();
          c4.gridx=0;
          c4.gridy = 0;
          c4.gridwidth=1;c4.gridheight=1;
          c4.anchor = java.awt.GridBagConstraints.NORTHWEST;
          c4.weightx=0;c4.weighty=0;
          c4.ipadx=0;c4.ipady=0;
          c4.fill=GridBagConstraints.NONE;
          c4.insets = new java.awt.Insets(40,20,0,0);
          XXqqds_DataField7= new JTextField();
          XXqqds_DataField7.setBackground(new Color(255,255,255));
          XXqqds_DataField7.setForeground(XXqqds_GridField3.getForeground());
          XXqqds_DataField7.setBounds(new Rectangle(77,22,123,19));
          XXqqds_DataField7.setHorizontalAlignment(SwingConstants.LEADING);
          GridBagConstraints c5 = new GridBagConstraints();
          c5.gridx=1;
          c5.gridy=0;
          c5.gridwidth=1;c5.gridheight=1;
          c5.anchor = java.awt.GridBagConstraints.NORTH;
          c5.weightx=0;c5.weighty=0;
          c5.ipadx=0;c5.ipady=0;
          //c.fill=GridBagConstraints.VERTICAL;
     //     c.fill=GridBagConstraints.HORIZONTAL;
          XXqqds_GridField8= new JPanel();
          XXqqds_GridField8.setBackground(XXqqds_GridField2.getBackground());
          XXqqds_GridField8.setForeground(XXqqds_GridField2.getForeground());
          XXqqds_GridField8.setLayout(new GridBagLayout());
          XXqqds_GridField8.setBounds(new Rectangle(28,39,118,22));
          GridBagConstraints c6 = new GridBagConstraints();
          c6.gridx=0;
          c6.gridy = 0;
          c6.anchor = java.awt.GridBagConstraints.SOUTH;
          c6.weightx=0;c6.weighty = 1.0D;
     //     c.fill=GridBagConstraints.BOTH;
XXqqds_GridField8.setPreferredSize(new java.awt.Dimension(205,42));
          c6.ipadx=0;c6.ipady=0;
XXqqds_DataField7.setPreferredSize(new java.awt.Dimension(117,20));
XXqqds_PushButton9= new JButton();
          XXqqds_PushButton9.setBackground(XXqqds_GridField8.getBackground());
          XXqqds_PushButton9.setForeground(XXqqds_GridField8.getForeground());
          XXqqds_PushButton9.setBounds(new Rectangle(68,0,67,22));
GridBagConstraints c7 = new GridBagConstraints();
c1.gridheight = 1;
c5.insets = new java.awt.Insets(40,0,0,0);
          c7.gridx=0;
          c7.gridy=0;
          c7.gridwidth=1;c7.gridheight=1;
          c7.anchor = java.awt.GridBagConstraints.WEST;
          c7.weightx = 1.0D;c7.weighty = 0.0D;
          c7.ipadx=0;c7.ipady=0;
          //c.fill=GridBagConstraints.BOTH;
c7.insets = new java.awt.Insets(0,20,0,0);
XXqqds_GridField8.add(XXqqds_PushButton9, c7);
          XXqqds_PushButton9.setText("Submit");
          XXqqds_PushButton9.setPreferredSize(new java.awt.Dimension(74,20));
          XXqqds_GridField3.add(XXqqds_TextGraphic4, c2);
          XXqqds_GridField3.add(XXqqds_DataField5, c3);
          XXqqds_GridField3.add(XXqqds_TextGraphic6, c4);
          XXqqds_GridField3.add(XXqqds_DataField7, c5);
          XXqqds_GridField2.add(XXqqds_GridField3, c1);
          XXqqds_GridField2.add(XXqqds_GridField8, c6);
     /*     XXqqds_PushButton9= new JButton();
          XXqqds_PushButton9.setBackground(XXqqds_GridField8.getBackground());
          XXqqds_PushButton9.setForeground(XXqqds_GridField8.getForeground());
          XXqqds_PushButton9.setBounds(new Rectangle(68,0,67,22));
GridBagConstraints c7 = new GridBagConstraints();
          c7.gridx = 0;
          c7.gridy = 0;
          c7.gridwidth=1;c7.gridheight=1;
          c7.anchor = java.awt.GridBagConstraints.WEST;
          c7.weightx = 1.0D;c7.weighty = 0.0D;
          c7.ipadx=0;c7.ipady=0;
     //     c7.fill=GridBagConstraints.BOTH;
c7.insets = new java.awt.Insets(0,20,0,0);
XXqqds_PushButton9.setPreferredSize(new java.awt.Dimension(74,22));
XXqqds_PushButton9.setText("Submit");
          XXqqds_GridField8.add(XXqqds_PushButton9, c7);
XXqqds_PushButton10= new JButton();
          XXqqds_PushButton10.setBackground(XXqqds_GridField8.getBackground());
          XXqqds_PushButton10.setForeground(XXqqds_GridField8.getForeground());
          XXqqds_PushButton10.setBounds(new Rectangle(0,0,68,22));
GridBagConstraints c8 = new GridBagConstraints();
          c8.gridx = 1;
          c8.gridy = 0;
          c8.gridwidth=1;c8.gridheight=1;
          c8.anchor = java.awt.GridBagConstraints.EAST;
          c8.weightx=0;c8.weighty=0;
          c8.ipadx=0;c8.ipady=0;
          //c.fill=GridBagConstraints.BOTH;
c8.insets = new java.awt.Insets(0,0,0,15);
XXqqds_DataField7.setPreferredSize(new java.awt.Dimension(117,20));
          XXqqds_PushButton10.setText("cancel");
          XXqqds_PushButton10.setPreferredSize(new java.awt.Dimension(74,22));
          XXqqds_GridField8.add(XXqqds_PushButton10, c8);
          return jContentPane;
     public static void main(String a[])
     new DataBase();

Hi EvilEdna,
First of all thanks for the suggession. Now i am sending properly indented code.
My problem is PushButton9 And PushButton10 are not displayed properly.Please check the constraints of
buttons 9 & 10.And i am using eclipse Visual editor IDE(2.1).
* Created on May 25, 2004
* To change the template for this generated file go to
* Window>Preferences>Java>Code Generation>Code and Comments
package demo;
import java.awt.*;
import javax.swing.border.*;
import java.awt.event.*;
import java.util.*;
import javax.swing.*;
import javax.swing.table.*;
import javax.swing.JMenuBar;
import javax.swing.JPanel;
import javax.swing.JLabel;
import javax.swing.JTextField;
import javax.swing.JButton;
import javax.swing.JFrame;
* @author kv5459
* To change the template for this generated type comment go to
* Window>Preferences>Java>Code Generation>Code and Comments
public class DataBase extends JFrame {
     private javax.swing.JPanel jContentPane = null;
JPanel XXqqds_GridField2;
     JPanel XXqqds_GridField3;
JLabel XXqqds_TextGraphic4;
     JTextField XXqqds_DataField5;
     JLabel XXqqds_TextGraphic6;
     JTextField XXqqds_DataField7;
JPanel XXqqds_GridField8;
JButton XXqqds_PushButton9;
JButton XXqqds_PushButton10;
     * This is the default constructor
     public DataBase() {
          super();
          initialize();
     * This method initializes this
     * @return void
     private void initialize() {
          this.setSize(500, 375);
          this.setContentPane(getJContentPane());
          setTitle("");
          setLocale(java.util.Locale.getDefault());
          setResizable(true);
          setState(Frame.NORMAL);
          setSize(500,375);
          setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE);
          setVisible(true);
     * This method initializes jContentPane
     * @return javax.swing.JPanel
     private javax.swing.JPanel getJContentPane() {
          if (jContentPane == null) {
               jContentPane = new javax.swing.JPanel();
               jContentPane.setLayout(null);
          /* JPanel */     
          XXqqds_GridField2= new JPanel();
          XXqqds_GridField2.setBackground(getContentPane().getBackground());
          XXqqds_GridField2.setForeground(getContentPane().getForeground());
          XXqqds_GridField2.setLayout(new GridBagLayout());
          jContentPane.add(XXqqds_GridField2);
/* JPanel */     
XXqqds_GridField3= new JPanel();
          XXqqds_GridField3.setBackground(XXqqds_GridField2.getBackground());
          XXqqds_GridField3.setForeground(XXqqds_GridField2.getForeground());
          XXqqds_GridField3.setLayout(new GridBagLayout());
          XXqqds_GridField3.setBounds(new Rectangle(0,0,175,39));
          GridBagConstraints c1 = new GridBagConstraints();
          c1.gridx = 0;
          c1.gridy = 0;
c1.gridwidth = 2;
c1.gridheight = 1;
          c1.anchor = java.awt.GridBagConstraints.CENTER;
          c1.weightx=0;c1.weighty=0;
          c1.fill = java.awt.GridBagConstraints.NONE;
          XXqqds_GridField3.setPreferredSize(new java.awt.Dimension(205,192));
          c1.ipadx = 0;c1.ipady = 0;
XXqqds_GridField2.add(XXqqds_GridField3, c1);
/* JLabel */
          XXqqds_TextGraphic4= new JLabel();
          XXqqds_TextGraphic4.setText("Name");
          XXqqds_TextGraphic4.setBackground(XXqqds_GridField3.getBackground());
          XXqqds_TextGraphic4.setForeground(XXqqds_GridField3.getForeground());
          XXqqds_TextGraphic4.setBounds(new Rectangle(13,2,49,15));
          GridBagConstraints c2 = new GridBagConstraints();
          c2.gridx=0;
          c2.gridy=0;
          c2.gridwidth=1;c2.gridheight=1;
          c2.anchor = java.awt.GridBagConstraints.NORTHWEST;
          c2.weightx = 0.0D;c2.weighty = 1.0D;
          c2.ipadx=0;c2.ipady=0;
          c2.fill = java.awt.GridBagConstraints.NONE;
          c2.insets = new java.awt.Insets(10,20,0,0);
XXqqds_GridField3.add(XXqqds_TextGraphic4, c2);
/* JTextField */
          XXqqds_DataField5= new JTextField();
          XXqqds_DataField5.setBackground(new Color(255,255,255));
          XXqqds_DataField5.setForeground(XXqqds_GridField3.getForeground());
          XXqqds_DataField5.setBounds(new Rectangle(77,0,122,19));
          XXqqds_DataField5.setHorizontalAlignment(SwingConstants.LEADING);
          GridBagConstraints c3 = new GridBagConstraints();
          c3.gridx=1;
          c3.gridy=0;
          c3.gridwidth=1;c3.gridheight=1;
          c3.anchor = java.awt.GridBagConstraints.NORTH;
          c3.weightx=0;c3.weighty = 0.0D;
          c3.ipadx = 0;c3.ipady=0;
          c3.insets = new java.awt.Insets(10,0,0,5);
          XXqqds_DataField5.setPreferredSize(new java.awt.Dimension(117,20));
          c3.fill=GridBagConstraints.HORIZONTAL;
XXqqds_GridField3.add(XXqqds_DataField5, c3);
/* JLabel */
          XXqqds_TextGraphic6= new JLabel();
          XXqqds_TextGraphic6.setText("Password");
          XXqqds_TextGraphic6.setBackground(XXqqds_GridField3.getBackground());
          XXqqds_TextGraphic6.setForeground(XXqqds_GridField3.getForeground());
          XXqqds_TextGraphic6.setBounds(new Rectangle(0,24,77,15));
          GridBagConstraints c4 = new GridBagConstraints();
          c4.gridx=0;
          c4.gridy = 0;
          c4.gridwidth=1;c4.gridheight=1;
          c4.anchor = java.awt.GridBagConstraints.NORTHWEST;
          c4.weightx=0;c4.weighty=0;
          c4.ipadx=0;c4.ipady=0;
          c4.fill=GridBagConstraints.NONE;
          c4.insets = new java.awt.Insets(40,20,0,0);
XXqqds_GridField3.add(XXqqds_TextGraphic6, c4);
          /* JTextField */
XXqqds_DataField7= new JTextField();
          XXqqds_DataField7.setBackground(new Color(255,255,255));
          XXqqds_DataField7.setForeground(XXqqds_GridField3.getForeground());
          XXqqds_DataField7.setBounds(new Rectangle(77,22,123,19));
          XXqqds_DataField7.setHorizontalAlignment(SwingConstants.LEADING);
          GridBagConstraints c5 = new GridBagConstraints();
          c5.gridx=1;
          c5.gridy=0;
          c5.gridwidth=1;c5.gridheight=1;
          c5.anchor = java.awt.GridBagConstraints.NORTH;
          c5.weightx=0;c5.weighty=0;
          c5.ipadx=0;c5.ipady=0;
c5.insets = new java.awt.Insets(40,0,0,0);
XXqqds_DataField7.setPreferredSize(new java.awt.Dimension(117,20));
     XXqqds_GridField3.add(XXqqds_DataField7, c5);
/* JPanel */
XXqqds_GridField8= new JPanel();
          XXqqds_GridField8.setBackground(XXqqds_GridField2.getBackground());
          XXqqds_GridField8.setForeground(XXqqds_GridField2.getForeground());
          XXqqds_GridField8.setLayout(new GridBagLayout());
          XXqqds_GridField8.setBounds(new Rectangle(28,39,118,22));
          GridBagConstraints c6 = new GridBagConstraints();
          c6.gridx=0;
          c6.gridy = 0;
          c6.anchor = java.awt.GridBagConstraints.SOUTH;
          c6.weightx=0;c6.weighty = 1.0D;
     XXqqds_GridField8.setPreferredSize(new java.awt.Dimension(205,42));
          c6.ipadx=0;c6.ipady=0;
XXqqds_GridField2.add(XXqqds_GridField8, c6);
/* Submit Button */
XXqqds_PushButton9= new JButton();
          XXqqds_PushButton9.setBackground(XXqqds_GridField8.getBackground());
          XXqqds_PushButton9.setForeground(XXqqds_GridField8.getForeground());
          XXqqds_PushButton9.setBounds(new Rectangle(68,0,67,22));
GridBagConstraints c7 = new GridBagConstraints();
c7.gridx=0;
          c7.gridy=0;
          c7.gridwidth=1;c7.gridheight=1;
          c7.anchor = java.awt.GridBagConstraints.WEST;
          c7.weightx = 1.0D;c7.weighty = 0.0D;
          c7.ipadx=0;c7.ipady=0;
          c7.insets = new java.awt.Insets(0,20,0,0);
          XXqqds_PushButton9.setText("Submit");
          XXqqds_PushButton9.setPreferredSize(new java.awt.Dimension(74,20));
          XXqqds_GridField8.add(XXqqds_PushButton9, c7);
     /* Cancel Button */
XXqqds_PushButton10= new JButton();
          XXqqds_PushButton10.setBackground(XXqqds_GridField8.getBackground());
          XXqqds_PushButton10.setForeground(XXqqds_GridField8.getForeground());
          XXqqds_PushButton10.setBounds(new Rectangle(0,0,68,22));
GridBagConstraints c8 = new GridBagConstraints();
c8.gridx = 1;
          c8.gridy = 0;
          c8.gridwidth=1;c8.gridheight=1;
          c8.anchor = java.awt.GridBagConstraints.EAST;
          c8.weightx=0;c8.weighty=0;
          c8.ipadx=0;c8.ipady=0;
     c8.insets = new java.awt.Insets(0,0,0,15);
XXqqds_PushButton10.setText("cancel");
          XXqqds_PushButton10.setPreferredSize(new java.awt.Dimension(74,22));
XXqqds_GridField8.add(XXqqds_PushButton10, c8);
          return jContentPane;
     public static void main(String a[])
     new DataBase();

Similar Messages

  • Grid Bag Layout

    Exception in thread "main" java.lang.NullPointerException
    at java.awt.Container.addImpl(Compiled Code)
    at java.awt.Container.add(Container.java:245)
    at Login.addC(Login.java:37)
    at Login.(init)(Login.java:28)
    at Login.main(Login.java:44)
    I get this error and it hangs all the time...what's wrong with it? I'm new to Java and this simple program is really giving me problems
    import javax.swing.*;
    import javax.swing.event.*;
    import java.awt.*;
    import java.awt.event.*;
    public class Login extends JFrame
    implements ActionListener{
    public Login(){
    setTitle("HyperSmart Login");
    Container contentPane = getContentPane();
    GridBagLayout gblLogin = new GridBagLayout();
    GridBagConstraints gbcLogin = new GridBagConstraints();
    contentPane.setLayout(gblLogin);
    gbcLogin.fill = GridBagConstraints.BOTH;
    gbcLogin.weightx = 0;
    gbcLogin.weighty = 100;
    JLabel lblUserName = new JLabel("Username");
    JTextField txtUserName = new JTextField();
    JLabel lblPassword = new JLabel("Password");
    JPasswordField txtPassword = new JPasswordField("", 10);
    addC(lblUserName, gbcLogin, 0, 0, 1, 1);
    addC(txtUserName, gbcLogin, 0, 1, 3, 1);
    addC(lblPassword, gbcLogin, 1, 0, 1, 1);
    addC(txtPassword, gbcLogin, 1, 1, 3, 1);
    addC(OKButton, gbcLogin, 2, 2, 1, 1);
    public void addC(Component c, GridBagConstraints gbcLogin,
    int x, int y, int w, int h){
    gbcLogin.gridx = x;
    gbcLogin.gridy = y;
    gbcLogin.gridwidth = w;
    gbcLogin.gridheight =h;
    getContentPane().add(c, gbcLogin);
    public void actionPerformed(ActionEvent e){
    public static void main(String[] args){
    Login frmLogin = new Login();
    frmLogin.show();
    JButton OKButton;

    you get nullPointer because OKButton is null.
    after
    JPasswordField txtPassword = new JPasswordField("", 10);
    just write OKButton = new JButton("OK");

  • Grid abck layout problem using swing components

    JScrollPane jsp1 = new JScrollPane(table1,k,i);
    JPanel ja = new JPanel();
    JCheckBox c1 = new JCheckBox();
    JCheckBox c2 = new JCheckBox();
    JCheckBox c3 = new JCheckBox();
    JLabel j = new JLabel("Button");
    GridBagLayout gbl = new GridBagLayout();
    GridBagConstraints gbc = new GridBagConstraints();
    ja.setLayout(gbl);
    gbc.gridwidth = 10;
    gbc.gridheight = 10;
    gbc.gridx = 0;
    gbc.gridy = 0;
    gbl.setConstraints(j,gbc);
    add(j);
    gbc.gridx = 1;
    gbc.gridy = 1;
    gbl.setConstraints(c2,gbc);
    add(c2);
    gbc.gridx = 2;
    gbc.gridy = 2;
    gbl.setConstraints(c3,gbc);
    add(c3);
    gbc.gridx = 3;
    gbc.gridy = 3;
    gbl.setConstraints(jsp1,gbc);
    add(jsp1);
    this my code for grid bag layout but when i run this code it is showing only empty panel..no components..
    of course iam not posting entire code of tis class..because it is lenghty..
    regards,
    sam

    Well, you set JPanel ja's layout to GridBagLayout, but it appears your adding the components to the parent, eg. add(j) should be ja.add(j) if you want it on JPanel ja. This is true for all your component adds.
    By the you can combine the setConstraints( ) and add calls: ja.add(j, bgc);
    Hope that helps.
    Cheers
    DB

  • Creating a grid-like layout

    Previously, I posted a problem with trying to wrap tables within tables, referencing this code.
    <!-- ... -->
    <tableLayout>
      <contents>
        <rowLayout>
          <contents>
            <bc4j:viewObjectScope name="CustomArrayDataGraphsView">
              <bc4j:rowStamp>
                <cellFormat>
                  <contents>
                    <tableLayout>
                      <contents>
                        <rowLayout>
                          <contents>
                            <link
                                  styleClass="OraHeaderSub"
                                  targetFrame="display">
                              <boundAttribute
                                              name="text">
                                <bc4j:attrValue name="AnalysisParam"/>
                              </boundAttribute>
                              <boundAttribute
                                              name="destination">
                                <bc4j:ordProperty name="url"/>
                              </boundAttribute>
                              <boundAttribute
                                              name="shortDesc">
                                <bc4j:attrValue name="Description"/>
                              </boundAttribute>
                            </link>
                          </contents>
                        </rowLayout>
                        <rowLayout>
                          <contents>
                            <bc4j:attrScope name="Graph">
                              <contents>
                                <html:object
                                             width="300"
                                             height="200">
                                  <boundAttribute
                                                  name="data">
                                    <bc4j:ordProperty name="url"/>
                                  </boundAttribute>
                                  <boundAttribute
                                                  name="type">
                                    <bc4j:ordProperty name="contentType"/>
                                  </boundAttribute>
                                  <rawText>
                                    <boundAttribute
                                                    name="text">
                                      <bc4j:attrValue name="Description"/>
                                    </boundAttribute>
                                  </rawText>
                                </html:object>
                              </contents>
                            </bc4j:attrScope>                                                                                                                                  
                          </contents>
                        </rowLayout>
                      </contents>
                    </tableLayout>
                  </contents>
                </cellFormat>
              </bc4j:rowStamp>
            </bc4j:viewObjectScope>
          </contents>
        </rowLayout>
      </contents>
    </tableLayout>
    <!-- ... -->The above code renders a single row of elements which are tables themselves. Using the <cellFormat> inside the <viewObjectScope> avoids the "new line" rendering of the internal tables of title/images. However, the internal tables do not wrap.
    This is an unfortunate side-effect of html tables. So, I need to basically make a sizeable grid (similarly to a GridLayout for all you AWT/Swing folks out there) layout that can render a specified number of columns per table, creating new rows as necessary. Something like...
    <gridLayout columns="5">
      <contents>
        <bc4j:viewObjectScope                                 name="CustomArrayDataGraphsView">
          <bc4j:rowStamp>
            <cellFormat>
              <contents>
                <!-- render something per row -->
              </contents>
            </cellFormat>
          </bc4j:rowStamp>
        </bc4j:viewObjectScope>
      </contents>
    </gridLayout>This custom layout will render a maximum of five columns of data per table row, where each column is actually a row of information from the view object.
    Is this possible using UIX components or should I start coding?
    Thanks,
    joe

    Also, displaying a bunch of "inline"ed tables would be really useful. I can't seem to do this from within a <header>, <hideShowHeader> tag, even with explicitly coding:
      <bc4j:viewObjectScope name="CustomArrayDataGraphsView">
        <bc4j:rowStamp>
          <bc4j:attrScope name="Graph">
            <contents>
                  <html:table style="display: inline">
                    <html:tr>
                      <html:td>
                        <styledText text="Title"/>
                      </html:td>
                    </html:tr>
                    <html:tr>
                      <html:td>
                        <styledText text="Image"/>
                      </html:td>
                    </html:tr>
                  </html:table>
    <!--
                  <tableLayout styleClass="display: inline" width="300">
                    <contents>
                      <rowLayout>
                        <contents>
                          <styledText text="Title"/>
                        </contents>
                      </rowLayout>
                      <rowLayout>
                        <contents>
                          <styledText text="Image"/>
                        </contents>
                      </rowLayout>
                    </contents>
                  </tableLayout>
            </contents>
          </bc4j:attrScope>
        </bc4j:rowStamp>
      <!-- render a "No Records Found" message -->
        <contents>
          <styledText
                      text="No Records Found"
                      styleClass="OraErrorText">
            <boundAttribute
                            name="rendered">
              <if>
                <comparison
                            type="lessThan">
                  <bc4j:viewObjectProperty name="estimatedRowCount"/>
                  <fixed
                         javaType="int">1</fixed>
                </comparison>
                <fixed
                       javaType="boolean">true</fixed>
                <fixed
                       javaType="boolean">false</fixed>
              </if>
            </boundAttribute>
          </styledText>
        </contents>
      </bc4j:viewObjectScope>Apparently, the header tags do something which effects the display of "inline"ed elements, like the tables in the previous example. Any suggestions? I know taking out of the header works great, but, the <hideShowHeader> functionality is particularly necessary.
    I have a time constraint on this... gotta be done by today, so if you have any other later minute suggestions besides creating a grid-like layout, let me know!
    Thanks,
    Joe

  • How to add layout constraints in CSS?

    Is there a way to specify layout constraints in CSS? For example how can I specify that the first column in a GridPane should be aligned right? This can be done programmatically by adding a column constraint to a GridPane, like here:
    GridPane gridpane = new GridPane();
    ColumnConstraints column = new ColumnConstraints();
    column.setHalignment(HPos.RIGHT);
    gridpane.getColumnConstraints().add(column);

    As far as I understand it this is not supported in CSS. In general size and layout is not included in JFX CSS by design:
    JavaFX CSS does not support CSS layout properties such as float, position, overflow, and width. However, the CSS padding and margins properties are supported on some JavaFX scene graph objects. All other aspects of layout are handled programmatically in JavaFX code.
    This is from: http://download.oracle.com/javafx/2.0/api/javafx/scene/doc-files/cssref.html
    This is a bit limiting at times as they are often heavily related. I imagine it was a decision around separation of concerns - I'm not sure yet whether this is a good idea or not.
    [url http://download.oracle.com/javafx/2.0/api/javafx/fxml/doc-files/introduction_to_fxml.html]FXML is worth a look at for making layouts as scripts, that non-Java programmers can work with. It doesn't solve the 'style' issue but might go some way to help you.
    Cheers,
    zonski
    Did you find this answer useful? If so, please mark as 'Correct' or 'Helpful'.

  • How to set user specific Layout for executing IW38/IW39  report.

    Dear Experts,
    We have 10 users seperatly, For executing IW38/39 transaction they have maintained seperate layouts for executing the reports. While saving layout they have saved the layout as 'user specific' Now some body has chage the settings.
    After changing the setting all are getting same layout.
    Please suggest how to set user specific layout. When user enter the IW38/39 report by default he should get his layout.
    Thanks in advance.

    Create Variant using SHD0 and with Group and assign to particular user's
    Here is the steps
    Creating a Variant Group
    1. Open transaction SHD0, enter the transaction code, and press enter.
    2. Choose the Standard Variants tab page, and then the sub tab page Variant Groups, and enter a group name, such as GROUP_GEN
    3. Choose Create. Enter a short text on the Maintain Variant Group window that appears and save the variant group.
    Assigning Users
    Once you have created the variant group and the relevant transaction variants with screen variants, you now need to assign users to the variant group as follows
    1. Return to the Standard Variants tab page, Variant Groups sub tab page.
    2. Enter the name of a user that you want to assign to this variant group, and choose Assign. A message that this user was successfully assigned to the variant group appears in the status bar. If you choose a where-used list for users, this user is displayed in the user list.
    3. However, for the screen variants of the variant group that you created above to be displayed for the user, you first need to select Set Proposal. The user is assigned to the group and the associated transactions are started with the corresponding variants only once you choose the Set Proposal function.
    You can use this procedure of user assignment for all other users that you want to add to the variant group
    Hope this helps.
    Thanks
    S.N

  • How to set custom keyboard layout as default?

    I've downloaded a german keyboard layout for normal PC keyboards from this page: http://www.nullpointer.de/stuff/keylayout/index.de.
    Everything works fine. The layout is showing up in "Input Sources".
    But for some reason I cannot uncheck the default "Apple German Keyboard Layout" as you can see in this screenshot:
    The TickBox next to it is disabled...
    This leads to the problem that in some applications that layout is being used (switched to) automatically instead of keeping the new one...
    How do I set a custom keyboard layout as default and/or deactivate built-in one?
    Thanks in advance!
    MemphiZ

    This has come up before, and I think it is not possible.  The OS always keeps one of its own Latin keyboards active, and unfortunately I have not seen any way that these (located in system/library/keyboard layouts/applekeyboardlayouts.bundle) can be modified by the user.
    PS Another possible source for "PC" layouts for people using that kind of hardware instead of Apple keyboards is the set of Logitech layouts provided when you download Ukelele.

  • How to set default Print layout in SDK!

    Hi All
    In Form Delivery (ID=140) I want to Add Button to set default print layout by Addon.
    Please let me know the interface and the table to do it. Thanks

    Hi Tao,
    there's a vb6 sample in the DIAPI documentation
    Sets the specified report layout as default
    Dim oCmpSrv As SAPbobsCOM.CompanyService
    Dim oReportLayoutService As ReportLayoutsService
    Dim oDefaultReportParams As DefaultReportParams
    'get company service
    oCmpSrv = oCompany.GetCompanyService
    'get report layout service
    oReportLayoutService = oCmpSrv.GetBusinessService(ServiceTypes.ReportLayoutsService)
    'get report layout params
    oDefaultReportParams = oReportLayoutService.GetDataInterface(ReportLayoutsServiceDataInterfaces.rlsdiDefaultReportParams)
    'set the report layout code
    oDefaultReportParams.LayoutCode = "POR20005"
    'set the report code
    'the report code is the document type code (e.g. POR2=PurchaseOrder)
    oDefaultReportParams.ReportCode = "POR2"
    'set the user code
    oDefaultReportParams.UserID = 1
    'delete the report layout
    oReportLayoutService.SetDefaultReport(oDefaultReportParams)
    i hope it helps you
    regards
    David

  • [svn:fx-trunk] 15679: Made layout constraint animation actually work.

    Revision: 15679
    Revision: 15679
    Author:   [email protected]
    Date:     2010-04-23 16:33:44 -0700 (Fri, 23 Apr 2010)
    Log Message:
    Made layout constraint animation actually work. Animating constraints (left, right, etc.) with the Animate effect worked previously, but only if the animation values were explicitly specified or, in a transition, if both states had valid values for the constraint. But if you attempted to run a transition animating "left" where the constraint was cleared in either state, the animation would fail.
    The fix checks for invalid values in the states and, when they occur, animates other related properties instead, or in addition. For example, an animation on "left" may turn into an animation on "x".
    QE notes: None (added new checkintest AnimateConstraintsTest; might be interesting to see for further Mustella test development)
    Doc notes: None
    Bugs: None
    Reviewer: Jason
    Tests run: checkintests (with new test), Mustella spark/effects
    Is noteworthy for integration: Yes. Downstream teams asked for this functionality.
    Modified Paths:
        flex/sdk/trunk/frameworks/projects/spark/src/spark/effects/Animate.as
        flex/sdk/trunk/frameworks/projects/spark/src/spark/effects/Resize.as
        flex/sdk/trunk/frameworks/projects/spark/src/spark/effects/supportClasses/AnimateInstance .as
        flex/sdk/trunk/frameworks/tests/basicTests/BasicTests-config.xml
        flex/sdk/trunk/frameworks/tests/basicTests/BasicTests.mxml
    Added Paths:
        flex/sdk/trunk/frameworks/tests/basicTests/spark/scripts/AnimateConstraintsTestScript.mxm l
        flex/sdk/trunk/frameworks/tests/basicTests/spark/views/AnimateConstraintsTests.mxml

    You have used elements like header, footer, footer1 and nav without using the correct DOCTYPE declaration. Replace the first line of your code with
    <!doctype html>
    Also have a look here for other problems http://validator.w3.org/check?verbose=1&uri=http%3A%2F%2Fhome.surewest.net%2Fstorytales%2F test%2Fforposting.html
    After the above has been fixed, please come back here to fix the remaining problem(s)
    Gramps

  • How to set Single-Page layout mode in C#

    I have searched through all of the API documents, without success in how to correctly set the PDLayoutMode to SinglePage.
    I am using Acrobat Standard 7.0.9 with the 7.0.5 SDK and Visual Studio C# Express 2005 edition. I have quite successfully interfaced with Acrobat using C#, and have been happily using it for the past 8 months. But, now I need to extend my app to programmatically set the page layout mode. I don't find complete enough documentation to help me get the job done.
    One hint I stumbled upon, was to use the AVAppSetPreferences(), but the docs are wimpy on the correct values for the method's two parameters.
    Anyone have any experience with AxAcroPDFLib, or other OLE methods to set the page layout mode to other than default?
    Regards,
    Dale.

    I would like to propose this as a new IDEA in this forum but again: NOT POSSIBLE. I am not privileged.

  • ALV Grid save layout

    Hi all,
    in a programm there is a ALV grid of type cl_gui_alv_grid.
    When I run the programm, I can change the layout (hide columns etc) but I can't
    save the changes I make. What do I have to do to activate the saving of the layout?
    Which field do I have to set to activate it or what can already be set which disables the showing of the save possibility?
    Greetings Fred.

    Hi Fred
    U need to transfer the name of the report and the user to the grid class in order to allow to save the layout:
    DATA: LT_VARIANT  TYPE DISVARIANT.
    LT_VARIANT-REPORT   = SY-REPID.
    LT_VARIANT-USERNAME = SY-UNAME.
    CALL METHOD ALV_GRID->SET_TABLE_FOR_FIRST_DISPLAY
           EXPORTING
                     IS_VARIANT                      = LT_VARIANT
                     I_SAVE                             = 'A'
                     IS_LAYOUT                       = LT_LAYOUT
                     IT_TOOLBAR_EXCLUDING = GT_NO_CODES
           CHANGING 
                     IT_OUTTAB                  = T_OUTPUT
                     IT_FIELDCATALOG      = GT_FIELDCAT.
    The user has to have the authorizations to manage the layout.
    Max

  • Setting row and column constraints in FXML

    I've set the column and row constraints in my FXML controller like this:
    RowConstraints row1 = new RowConstraints();
    row1.setVgrow(Priority.ALWAYS);
    RowConstraints row2 = new RowConstraints();
    row2.setMaxHeight(150);
    row2.setVgrow(Priority.NEVER);
    pane.getRowConstraints().addAll(row1, row2);
    ColumnConstraints column1 = new ColumnConstraints();
    column1.setMaxWidth(250);
    column1.setHgrow(Priority.NEVER);
    ColumnConstraints column2 = new ColumnConstraints();
    column2.setHgrow(Priority.ALWAYS);
    pane.getColumnConstraints().addAll(column1, column2);and it works fine but what I can't figure out is how I'll do that using only FXML?

    Hi,
    Try the following:
        <?import javafx.scene.layout.*?>
        <GridPane>
            <rowConstraints>
                <RowConstraints vgrow="ALWAYS" />
                <RowConstraints maxHeight="150" vgrow="NEVER" />
            </rowConstraints>
            <columnConstraints>
                <ColumnConstraints maxWidth="250" hgrow="NEVER"/>
                <ColumnConstraints hgrow="ALWAYS"/>
            </columnConstraints>
            <children>
            </children>
        </GridPane>Basically 'rowConstraints' and 'columnConstraints' are attributes on GridPane of type Collection.
    Hope that helps,
    zonski
    Did you find this answer useful? If so, please mark as 'correct' or 'helpful'.

  • Flex 4 UI Layout Constraint mis-behavior

    Hello,
    So here is the problem, below is basically my application wireframe in mxml. The problem comes in when I'm looking at a report component, so the reportComponents is visible, not the filterComponents.
    What is happening is the UI element is sliding outside the container to the left when the browser resizes, it literally slides right off the screen.
    I have tried defining layouts and layout contraints and other various fixes to no avail.
    Can anyone help me?
        <s:SkinnableContainer width="100%" minWidth="768" maxHeight="800"  >    
            <!-- Reports Components - ReportsHolder manages which report is being viewed.... SubChiron has variances depending on which report, but configures itself accordingly -->
            <s:Group  id="ReportComponents" horizontalCenter="0" left="5"
                      width="100%" bottom.reportState="0" top="10"
                      height.loadingState="0" height.loadedState="0" height.reportState="100%"
                      alpha.loadingState="0" alpha.loadedState="0" alpha.reportState="1"
                      visible.loadedState="false">    
                <components:SubChiron id="subChiron" top="155" height.loadedState="0" alpha.loadedState="0"
                                      REPORT_VIEW_EVENT="ReportViewStateChange(event)" PE_TO_STATE="pEStateChange(event)" PART_COST_EVENT="pcReportChange(event)"
                                      CPP_EVENT="cppEventHandler(event)" EVAL_QUESTION_EVENT="EvalQuestionEventHandler(event)" EVAL_FILTER_EVENT="EvalFilterHandler(event)"
                                      PRINT_GRID_EVENT="PrintGridHandler(event)"/>
                <views:ReportsHolder top="250" id="reportsComponent" height.reportState="65%" minHeight.reportState="650" width="100%" height="0" bottom="0" left="5"/>
            </s:Group>
            <views:Chiron id="ApplicationControlPanel" top="0"
                          RESET_EVENT="resetDataHandler()" HOME_EVENT="homeEventHandler()" SELECT_SEARCH_EVENT="searchResultHandler(event)" />
            <s:Group id="dashboardComponents"
                     alpha.loadingState="0" alpha.loadedState="1" alpha.reportState="0" visible.reportState="false"
                     height.reportState="0"
                     width="100%" height="100%">
                <mx:HBox top="170" bottom="15" horizontalCenter="0" width="98%" height="100%" horizontalGap="10">
                    <views:Filters id="FiltersPanel" left="15" FILTER_EVENT="AddFilterHandler(event)" FILTER_XMLLIST_EVENT="AddSpecialFilterHandler(event)" />
                    <views:FiltersStates id="FiltersStatesPanel" FILTER_SET_EVENT="filterSet(event)" FILTER_SET_EVENT2="filterSet(event)" FILTER_SET_EVENT3="filterSet(event)" FILTER_SET_EVENT4="filterSet(event)" left="235" />
                    <views:Results id="ResultsPanel" RESULT_SET_EVENT="programCountDispatchHandler()" SELECT_SEARCH_EVENT="searchResultHandler(event)"  />
                    <views:Reports id="ReportsPanel" right="15" REPORT_GENERATION_EVENT="doReportGeneration(event)" />
                </mx:HBox>
            </s:Group>
        </s:SkinnableContainer>  

    It's really hard to tell what is going on without being able to run your sample.  My wild guess would be that this is working as it should since you set <views:Reports id="ReportsPanel" right="15" ... which means that the panel will always be glued to the right of its parent container.  So if that parent container gets smaller then the reports panel will move to the left to ensure the right="15" constraint is satisfied.

  • How to layout constraint rows and columns "right"?

    Hi.
    I have a complex constraint layout with 8 columns and 11 rows. Since this layout is not an MXML-file, I need to do it in actionscript. Is there a "best pratice" on how to layout this without the Design view in Flash Builder?
    Is it possible to display the columns and rows like in HTML, where I could say "border=1" or use css?
    Regards,
    Jo

    What makes you think that it is not there? Any form which doesn't have the same set of members across rows and dimensions are asymmetric.
    Asymmetric rows and columns contain different sets of members selected across the same dimensions
    Oracle Hyperion Planning, Fusion Edition Administrator's Guide
    I can add a column with only Q1 and then another column with Q2, Q3, Q4 which will make it an asymmetric form. Keep in mind not to check "Place selection in separate columns".
    Regards
    Celvin
    http://www.orahyplabs.com

  • How too set query print layout parameters?

    Hello,
    simple task:
    1. Open "Query Print Layout...": SBO_Application.ActivateMenuItem("4868")
    2. Handle new reports form: SBO_Application.Forms.ActiveForm (I know, the better solution should be get form with proper TypeEx and highest TypeCount, but now it doesn't matter)
    3. Select row with required report: m.Columns.Item(0).Cells.Item(row).Click(BoCellClickType.ct_Regular, 0)
    4. Run printing: SBO_Application.ActivateMenuItem("519")
    5. Handle new parameters form: ???
    How can I get newly created form containing report parameters (TypeEx "4000")? I wanna set proper parameters and click "OK" to show printed report. Doesn't work handling:
    - FORM_LOAD in ItemEvent
    - MenuEvent for "519" (is only BeforeAction
    - PrintEvent (executed after accepting parameters)
    - ReportDataEvent (passed FormUID belongs to reports list, not parameters)
    In each event I've listed all forms and there is no form titled "Query - Selection Criteria" with expected TypeEx.
    Is there any way to achive this?

    when you activate print preview of printing on selected User Query Layout, you can cacth the ET_FORM_LOAD event of formTypeEx =4000
    It is working. Please note if you do not have this event, you may check your filters (?)
    Then you can populate your values. Based on my experience the click ok button is not working.
    Tip: Search the forum in year 2009 i have posted there sample codes
    Regards
    J

Maybe you are looking for

  • Video issues with new Nano, can anyone help?

    I recently bought 'South Park' from the i-tunes store to play on my 3rd generation Nano. Unfortunately when i try to sync it with my nano it says 'video format not supported', other downloads work fine but i-tunes have provided no information when do

  • Recommend a Free Mail Server (Windows)

    Hi, Can somebody recommend a free mail server that I can use when running demo's / POC's / Training etc from my local machine for use with Delivers. There seems to be a few out there - I'd be interested if anybody can advise there experience with any

  • How To: Identifying and locating the correct driver for your device

    I installed a new version of windows 7 on my laptop. But im having issues locating the right drivers for it., Nothing is working correctly and its so Annoying. Can Anyone help me. When i put in the model number it says its not found, But its a sateli

  • Standard Role "SAP_QAP_BW_DASHBOARDS" Unavailable in ECC System

    Hello Experts. We are trying to Implement Embedded Analytics in our R3 system, from the SAP documentation I came to know that in order to execute the standard Reports/Dashboards as a pre-requisite we need to have the role "SAP_QAP_BW_DASHBOARDS" assi

  • How can i see how much capacity my 3g sim has left on my ipad?

    i have inserted a 3g pay as you go sim into my ipad.  how can i check how much usage it has left or when I need to top it up? thanks