Hi there, first time poster here looking for some really good help!

My problem is this. Our project is a Java program that allows a user to choose parts for a wind turbine, calculate the total cost of the parts, and save/output this contract information as a .txt file for printing later. The parts exist on a precreated database, that can be updated via this program as well. The database is a Java Database that was created in NetBeans using the JDB tools. The entire program is in NetBeans.

Now, here comes the question! When the user wants to create a new contract, he presses the new contract button as displayed via a JMenu; this part functions without problem. A JInternalFrame shows up showing the user four key sections; the name/address panel, the contract panel, the button panel, and the parts chosen panel. The user types in the address details.

With the parts panel though I want it to access the database, entitled PartsData. Inside PartsData are three columns; Parts Code, Description, Price. What i want the program to do is when the user chooses the part code, which is currently a JComboBox, the code number is displayed in the box, and then the corresponding part description and price to that code are entered into the JTextFields that they belong to within the panel. Is this at all possible?

So to summarise:

-I have a Java Database table entitled PartsData
-I have a panel entitled PartsPanel
-I want to know how to link the database into my PartsPanel
-I want to then be able to load in the corresponding descriptions etc with the Parts Code that is chosen in the ComboBox
-All this is being done in NetBeans

Here is the code for PartsPanel.java to help. Since the rest of the stuff (The JFrame, internal frames setup) doesn't manipulate anything in the code other than to set up the display of the screen, i figure this is where the code to get the database implemented needs to go. Any help would be absolutely fantastic, as the Project is running out of time

Code:
/*
 * To change this template, choose Tools | Templates
 * and open the template in the editor.
 */

package org.weces.programParts;

/**
 *
 * @author 
 */

//Wind Turbines Project 2009 
//Date Amended: 9th July 2009
//Current Author: William A. Main

import java.awt.*;
import java.awt.event.*;
import javax.swing.*;
import javax.swing.event.*;
import java.sql.*;

public class PartsPanel extends JPanel {
    

    private JLabel partName;
    private JComboBox partBox;
    private JPanel partPanel;

    private JLabel partCode;
    public JTextField partCodeField;
    private JPanel partCodePanel;

    private JLabel partDescription;
    public JTextField partDescriptionField;
    private JPanel partDescriptionPanel;

    private JLabel priceLabel;
    public JTextField priceField;
    private JPanel pricePanel;

    private JLabel totalPrice;
    private JLabel totalPriceField;
    public JPanel totalPricePanel;

    private JLabel quantityLabel;
    private JTextField quantityField;
    private JPanel quantityPanel;
    private JPanel tidyPanel;

    public PartsPanel()
    {
        tidyPanel = new JPanel();
        tidyPanel.setLayout(new GridLayout(6,0));
        partName = new JLabel("Part Code: ");
        partBox = new JComboBox(
                );
        partPanel = new JPanel();
        partPanel.setLayout(new BorderLayout());
        partPanel.add(partName, BorderLayout.WEST);
        partPanel.add(partBox, BorderLayout.EAST);
        tidyPanel.add(partPanel);

        partCode = new JLabel("Part Name: ");
        partCodeField = new JTextField();
        partCodeField.setEditable(true);
        partCodeField.setPreferredSize(new Dimension(200, 10));
        partCodePanel = new JPanel();
        partCodePanel.setLayout(new BorderLayout());
        partCodePanel.add(partCode, BorderLayout.WEST);
        partCodePanel.add(partCodeField, BorderLayout.EAST);
        tidyPanel.add(partCodePanel);


        partDescription = new JLabel("Part Description: ");
        partDescriptionField = new JTextField();
        partDescriptionField.setEditable(false);
        partDescriptionField.setPreferredSize(new Dimension(200, 10));
        partDescriptionPanel = new JPanel();
        partDescriptionPanel.setLayout(new BorderLayout());
        partDescriptionPanel.add(partDescription, BorderLayout.WEST);
        partDescriptionPanel.add(partDescriptionField, BorderLayout.EAST);
        tidyPanel.add(partDescriptionPanel);

        priceLabel = new JLabel("Price: ");
        //BEING USED IN PARTS EDITING FRAME AS WELL
        priceField = new JTextField();
        priceField.setEditable(false);
        priceField.setPreferredSize(new Dimension(200, 10));
        //BEING USED IN PARTS EDITING FRAME AS WELL
        pricePanel = new JPanel();
        pricePanel.setLayout(new BorderLayout());
        pricePanel.add(priceLabel, BorderLayout.WEST);
        pricePanel.add(priceField, BorderLayout.EAST);
        tidyPanel.add(pricePanel);

        quantityLabel = new JLabel("Quantity: ");
        quantityField = new JTextField();
        quantityField.setEditable(true);
        quantityField.setPreferredSize(new Dimension(200, 10));
        quantityPanel = new JPanel();
        quantityPanel.setLayout(new BorderLayout());
        quantityPanel.add(quantityLabel, BorderLayout.WEST);
        quantityPanel.add(quantityField, BorderLayout.EAST);
        tidyPanel.add(quantityPanel);

        totalPrice = new JLabel("Total Price: "); // sum of each part times the quantity required of each part
        totalPriceField = new JLabel();
        totalPriceField.setPreferredSize(new Dimension(200, 10));
        totalPricePanel = new JPanel();
        totalPricePanel.setLayout(new BorderLayout());
        totalPricePanel.add(totalPrice, BorderLayout.WEST);
        totalPricePanel.add(totalPriceField, BorderLayout.EAST);
        tidyPanel.add(totalPricePanel);



        setLayout(new BorderLayout());
        add(tidyPanel, BorderLayout.CENTER);
        tidyPanel.setVisible(true);
        setVisible(true);

    }

}