HOW TO DISPLAY COMPONENTS ROW BY ROW AS A FORM? I want the below program to be modified so that i can get my java application to look like an entry form.. Please help me..

HOW TO DISPLAY COMPONENTS ROW BY ROW AS A FORM? I want the below program to be modified so that i can get my java application to look like an entry form.. Please help me..

    JFrame main=new JFrame("Home-THE SECURED PARKING SERVICE MAIN PAGE");
    main.getContentPane().setBackground(Color.blue);

    JPanel titlePanel=new JPanel();
    JLabel heading=new JLabel("*******THE SECURED PARKING SERVICES*******",JLabel.CENTER);
    heading.setOpaque(true);![alt text][1]
    heading.setBackground(Color.orange);
    heading.setForeground(Color.black);
    heading.setFont(new Font("Serif", Font.BOLD, 35));
    titlePanel.setBackground(Color.blue);
    titlePanel.add(heading);
    //entrypanel and textfields

    JPanel entryPanel=new JPanel();
    entryPanel.setLayout(new BoxLayout(entryPanel,BoxLayout.Y_AXIS));
    JTextField name=new JTextField(10);
    name.setBounds(0, 0, 20, 50);   
    JTextField custid=new JTextField(10);
    JTextField address=new JTextField(10);
    JTextField dob=new JTextField(10);
    JTextField vehiclename=new JTextField(10);
    JTextField vehiclereg_no=new JTextField(10);
    JTextField license_no=new JTextField(10);
    entryPanel.add(name);
    entryPanel.add(custid);
    entryPanel.add(address);
    entryPanel.add(dob);
    entryPanel.add(vehiclename);
    entryPanel.add(vehiclereg_no);
    entryPanel.add(license_no);![alt text][2]
    main.add(titlePanel);
    main.add(entryPanel);
    main.setLayout(new BoxLayout(main.getContentPane(),BoxLayout.Y_AXIS));
    main.setSize(1368,770);//exact window size
    main.setVisible(true);
    main.setDefaultCloseOperation(main.EXIT_ON_CLOSE);

My output is like this:

View Answers

September 3, 2012 at 4:19 PM

We have modified your code. Here it is:

JFrame main=new JFrame("Home-THE SECURED PARKING SERVICE MAIN PAGE");
    main.getContentPane().setBackground(Color.blue);

    JPanel titlePanel=new JPanel();
    JLabel heading=new JLabel("*******THE SECURED PARKING SERVICES*******",JLabel.CENTER);
    heading.setOpaque(true);
    heading.setBackground(Color.orange);
    heading.setForeground(Color.black);
    heading.setFont(new Font("Serif", Font.BOLD, 35));
    titlePanel.setBackground(Color.blue);
    titlePanel.add(heading);
    //entrypanel and textfields

    JPanel entryPanel=new JPanel();
    entryPanel.setLayout(new BoxLayout(entryPanel,BoxLayout.Y_AXIS));
    JTextField name=new JTextField(10);
    name.setBounds(0, 0, 20, 50);   
    JTextField custid=new JTextField(10);
    JTextField address=new JTextField(10);
    JTextField dob=new JTextField(10);
    JTextField vehiclename=new JTextField(10);
    JTextField vehiclereg_no=new JTextField(10);
    JTextField license_no=new JTextField(10);
    entryPanel.add(name);
    entryPanel.add(custid);
    entryPanel.add(address);
    entryPanel.add(dob);
    entryPanel.add(vehiclename);
    entryPanel.add(vehiclereg_no);
    entryPanel.add(license_no);
    main.add(titlePanel);
    main.add(entryPanel);
    main.setLayout(new BoxLayout(main.getContentPane(),BoxLayout.Y_AXIS));
    main.setSize(1368,770);//exact window size
    main.setVisible(true);
    main.setDefaultCloseOperation(main.EXIT_ON_CLOSE);

September 5, 2012 at 4:56 PM

Huh!! Nothing different. Please post me the correct one by indicating the incorrect ones..









Related Tutorials/Questions & Answers:
Hii i want a JMS application can anybody help me
I want Mini Java Project for Student Admission System. actually i want 2 know how 2 start this...please show me my way.....
Advertisements
how can create pop() method in this program ,Or how can delete image in it when i press pop button in runtime ??? please help me ...
I need help on my Java code.... please please help me out!?
how can i write this program ?please suggest me
i want to find the byte code of a image file ... for my project..plz if anybody help me for java coding i will grateful..
How can I to my database to my application
how can i display a editable result of form?
this is my javascript code and i am not understanding the mistake in this,please help me?
Want to display Arraylist items on same row in JSF
i want java code for this xml file...please show me..
please i want someone to answer me pleeeeeeeeeeeeease...
I want to update the multiple values of database depending on checkbox..? Please help me out..
my hibernate showing the following exception so how i can resolve it
I want to display 10,000 records in a jsp page.Can I display page by page?
Please tell me how can i convert string to timer
how to display jsp page containing mysql query in particular division using ajax ?my code is below bt i cundt get it properly
actually i want to knw how to include an google page inside a tab(suppose in 2nd tab).can any one help me....
please please i wanna insertion sort program find calendar to array value (1000,5000,10000), please help me
How can I connect my database to my application ?
I want to change my user name on your website ,how can i do this
i want to create an icon on my desktop... with this i want to open my web application
Please tell me how I can access a field (data type char) of resultset in a java class
how can i use toggle button in my application
i want to create website,with manu with three level submenu on top side of page please send me code java
Want to learn java - How i can learn Java from scratch?
how can i simplify my java code
sir/mam i want to have knowledge on live projects of java/jsp/servlets.Can you plz help me out
sir/mam i want to have knowledge on live projects of java/jsp/servlets.Can you plz help me out
sir/mam i want to have knowledge on live projects of java/jsp/servlets.Can you plz help me out
sir/mam i want to have knowledge on live projects of java/jsp/servlets.Can you plz help me out
sir/mam i want to have knowledge on live projects of java/jsp/servlets.Can you plz help me out
sir/mam i want to have knowledge on live projects of java/jsp/servlets.Can you plz help me out
sir/mam i want to have knowledge on live projects of java/jsp/servlets.Can you plz help me out
sir/mam i want to have knowledge on live projects of java/jsp/servlets.Can you plz help me out
sir/mam i want to have knowledge on live projects of java/jsp/servlets.Can you plz help me out
inheritance....please help me friends...!!!... this is important project that i have to do it..
Please help me to modify my java code from php code
Please help me to modify my java code from php code
How to launch my web application from my desktop without opening Netbeans IDE everytime i run the application?
please help me in a java program !! - Java Beginners
I need add my java program with a picture.
please help me for this program - Java Beginners
How could I use Socket in my application?
how can i get output pls urget tell me
I am trying to develop a Image Sliding application but unfortunately its not working... Can any one help me in this
how to i convert this case to loop...please help.....
how to i convert this case to loop...please help.....
how to i convert this case to loop...please help.....
how to i convert this case to loop...please help.....

Ads