Need to know if you can help me complete my course project. There are a couple of things I need help with. First I need help with making my Jlabel print on 2 lines instead of one long line. These are the two lines I need help with.
labelContractors.setText(file.getName()+" does not exist yet. It will be created when you add a contractor!");
lblCustomerStatus.setText("Customer.txt does not exist yet. It will be created when you add a customer!");
The other thing I would like help with is creating a menu bar for the Customer and Contractor tab where the action could be selected as follows:
"Select Action to Perform" (KeyEvent_S)
"Add New Customer" (KeyEvent_A)
"Edit Customer" (KeyEvent_E)
"Delete Customer" (KeyEvent_D)
(Same for Contractor tab)
The last thing I need help with is creating a report tab and menu.
The report menu would need the following:
"Generate Report" (KeyEvent_R)
Would like to be able to generate a report that list all customers and one that would list all contractors.Attachments
//If the file is not created create a new one
try
{
File file = new File(MainWindow.CUSTOMER_FILE);
boolean success = file.createNewFile();
// Create file if it does not exist
if(success)// File did not exist and was created
{
PrintWriter out =