Welcome to the Java Programming Forums

The professional, friendly Java community. 21,500 members and growing!

The Java Programming Forums are a community of Java programmers from all around the World. Our members have a wide range of skills and they all have one thing in common: A passion to learn and code Java. We invite beginner Java programmers right through to Java professionals to post here and share your knowledge. Become a part of the community, help others, expand your knowledge of Java and enjoy talking with like minded people. Registration is quick and best of all free. We look forward to meeting you.

>> REGISTER NOW TO START POSTING

1. ## NEED HELP ASAP!!

I have a final project and this is the requirments of it

Notes:
1.General Tab: There will be a General Tab that will display today’s date for the users.
2. Pool: After a length, width, and depth have been entered, the user can click Enter and the program will display the calculated volume (length * width * depth in cubic feet).
3. Hot Tub: The Hot Tub tab allows for round and oval tubs’ volumes to be calculated. When Round Tub is selected, the user cannot fill out the width field since we’re dealing with a circle. After filling out the length and depth fields, the Enter button will display the volume (Pi * ((length/2)^2) * depth). The width is automatically set to the same value as the length, and the user is informed. The formula used to calculate the volume is (Pi * (length * width)^2) * depth.
4. Temperature changer- This will convert the temp from C to F.
• To convert Fahrenheit temperatures into Celsius:
o Begin by subtracting 32 from the Fahrenheit number.
o Divide the answer by 9.
o Then multiply that answer by 5
• To convert Celsius into Fahrenheit temperatures:
o Begin by multiplying the Celsius temperature by 9.
o Divide the answer by 5.
5. Manufacturer- This will be where you place the manufacturing companies name your hot tub or pool. You will be asked to input the name and then click the Enter button and it will display the manufacture name.
6. Customer- Gives you the option to place your full name and address. You will be asked to input the name, address and then click the Enter button and it will display all three in the display section.
7. Customer Comments- Gives you the option to place comment and press enter. When you press enter your message will be displayed in the display section.

This is the coding I have so far... I need a lot of help and guidance to the right direction
```import java.awt.*;
import javax.swing.*;;

public class FinalProject extends JFrame
{
private JLabel textPrompt;
private JTextArea inputText;
private JLabel keyPrompt;
private JTextField inputKey;
Container container;

public FinalProject()
{
super( "Final Project " );

JTabbedPane tab = new JTabbedPane();
// constructing the first panel

JLabel l1 = new JLabel( "Pool" );
JPanel p1 = new JPanel();
Label heightLabel = new Label ("Height:");
TextField heightField = new TextField(15);
Label widthLabel = new Label ("Width:");
TextField widthField = new TextField(15);
Label depthLabel = new Label ("Depth:");
TextField depthField = new TextField(15);

tab.addTab( "Pool", null, p1, " Pool" );

// constructing the second panel
JLabel l2 = new JLabel("Hot Tube");
JPanel p2 = new JPanel();

//Pi * (length * width)^2) * depth

tab.addTab( "Hot Tube", null, p2, " Hot Tube" );

// constructing the third panel

JLabel l3 = new JLabel( " Temperature Change!" );
JPanel p3 = new JPanel();
tab.addTab( "Temperature Change", null, p3, " Temperature Change" );

// constructing the fourth panel

JLabel l4 = new JLabel( "Customer" );
JPanel p4 = new JPanel();
tab.addTab( "Customer", null, p4, " Customer" );

// constructing the fifth panel

JLabel l5 = new JLabel( "General" );
JPanel p5 = new JPanel();
tab.addTab( "General", null, p5, " General");
//constructing the last panel

JLabel l6 = new JLabel( "Manufacture");
JPanel p6 = new JPanel();
tab.addTab( "Manufacture", null, p6, " Manufacture" );

//constructing the Comment panel

JPanel p7 = new JPanel();
JPanel enterPanel = new JPanel(  );
JButton enterButton = new JButton("Enter");

inputText = new JTextArea(5, 15);
inputText.setLineWrap(true);
inputText.setWrapStyleWord(true);

container = getContentPane();

//use borderlayout to position our two i/o panels
container.setLayout(new BorderLayout());
p7.setLayout(new FlowLayout());

//add panels to our primary borderlayout

setSize( 400, 250 );
setVisible( true );

}
public static void main( String args[] )
{
FinalProject demo = new FinalProject();
demo.setDefaultCloseOperation( JFrame.EXIT_ON_CLOSE );
}

}```

2. ## Re: NEED HELP ASAP!!

What are your questions or problems?

Please use code tags when posting code to preserve the formatting and indentations.

3. ## Re: NEED HELP ASAP!!

My questions is the whole code... I know I have the tabs correctly and the customer comments correctly. I dont know how to do the volume section for the pool or hot tube section or do the general tab where it is suppose to display todays date.

4. ## Re: NEED HELP ASAP!!

Take them one at a time:
how to do the volume section for the pool
Can you describe what is the problem here?

5. ## Re: NEED HELP ASAP!!

The assignment is to have text areas where a customer can put in the height, width and depth of the pool and they use all of that to calculate the volume.

6. ## Re: NEED HELP ASAP!!

You need to design a GUI with text fields where a customer can put in the data.
Use a JPanel to hold the components.
Design how the components are to be positioned in the panel and the chose a layout manager to support that.

7. ## Re: NEED HELP ASAP!!

Im still kind of confused on the format of the code? I am new to this and dont know how to do this...

8. ## Re: NEED HELP ASAP!!

Time to do some reading in the Tutorial about how to build GUI.