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.
o Now add 32
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 JLabel l7= new JLabel("Customer Comments?"); JPanel p7 = new JPanel(); JPanel enterPanel = new JPanel( ); JButton enterButton = new JButton("Enter"); enterPanel.add(enterButton); textPrompt = new JLabel("Customer Comments here please!"); inputText = new JTextArea(5, 15); inputText.setLineWrap(true); inputText.setWrapStyleWord(true); //add components to window container = getContentPane(); //use borderlayout to position our two i/o panels container.setLayout(new BorderLayout()); p7.setLayout(new FlowLayout()); //add components to panels p7.add(textPrompt); p7.add(inputText); //add panels to our primary borderlayout add(p7, BorderLayout.NORTH); // add JTabbedPane to container getContentPane().add( tab ); setSize( 400, 250 ); setVisible( true ); tab.addTab ("Customer Comments?",null,p7,"Customer Comments?"); } public static void main( String args[] ) { FinalProject demo = new FinalProject(); demo.setDefaultCloseOperation( JFrame.EXIT_ON_CLOSE ); } }