Program is mostly written, just need to correct the error and get the program to display correctly. Each tab must be in it's own tab... I'm having an issue with getting ride of one errors and then of course the logical errors I can't find!
Document Preview:
package wk7; import java.awt.*; import java.awt.event.*; import java.io.*; import java.text.DecimalFormat; import javax.swing.*; public class LandscapingCalculator extends JFrame { private static final long serialVersionUID = 1L; private JTabbedPane tab; private JPanel topPanel; final JPanel Customers; final JPanel Contractors; final JPanel HotTubs; public LandscapingCalculator() { super(" Landscaping Calculator"); tab = new JTabbedPane(); getRootPane().add(tab); // add tabs to tab tab.addTab("Customers", new Customers()); tab.addTab("Contractors", new Contractors()); tab.addTab("Pools", new Pools()); tab.addTab("Hot Tubs", new HotTubs()); topPanel = new JPanel(); topPanel.setLayout(new BorderLayout()); getContentPane().add(topPanel); topPanel.add(tab, BorderLayout.CENTER); setSize(425, 250); setBackground(Color.blue); setVisible(true); } public static void main(String[] args) { LandscapingCalculator calcFrame = new LandscapingCalculator(); calcFrame.setSize(425, 250); calcFrame.setVisible(true); calcFrame.setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE); } } class Customers extends JPanel { private static final long serialVersionUID = 1L; public Customers() { JTextField custName; JTextField custCity; JTextField custState; JTextField custZip; JTextField custPhone; JTextField custAdd; final JTextArea custArea = new JTextArea(6, 30); final JTextArea custMessage; JTextArea custAddMessage; // Add customer button JButton addCustomer = new JButton("Add Customer"); addCustomer.setMnemonic(0); // Customer Panel JPanel custPanel = new JPanel(); custArea.setText("Select Add Customer to add customer. Select Refresh to refresh this pane."); custArea.setForeground(Color.orange); custArea.setLineWrap(true); custArea.setWrapStyleWord(true); JButton custRefButton = new...
Click here to order this paper @Essaybay.net. The Ultimate Custom Paper Writing Service
No comments:
Post a Comment