Question

Need some help fixing these compilation errors that start around line 20, thank you

import javax.swing.*;

public class PropertyTax1 extends JFrame
{
   private static final int WIDTH = 400, HEIGHT = 300;
  
   public PropertyTax1()
   {
       setTitle("Calculation of Property Taxes");
       setSize(WIDTH, HEIGHT);
       setVisible(true);
       setDefaultCloseOperation(EXIT_ON_CLOSE);
   } // end of the constructor method
  
   public static void main(String[] args)
   {
       PropertyTax1 proptax = new PropertyTax1();
       JLabel assessL = new JLabel("Assessment Home Value", SwingConstants.RIGHT);
           JTextField assessTF = new JTextField(10);
       JLabel assessL = new JLabel("Decimal Value of School Tax Rate", SwingConstants.RIGHT);
           JTextField assessTF = new JTextField(10);
       JLabel assessL = new JLabel("Decimal Value of County Tax Rate", SwingConstants.RIGHT);
           JTextField assessTF = new JTextField(10);
       JLabel assessL = new JLabel("School Taxes", SwingConstants.RIGHT);
           JTextField assessTF = new JTextField(10);
       JLabel assessL = new JLabel("County Taxes", SwingConstants.RIGHT);
           JTextField assessTF = new JTextField(10);
       JLabel assessL = new JLabel("Total Taxes", SwingConstants.RIGHT);
           JTextField assessTF = new JTextField(10);
          
   JButton exit = new JButton("Exit");
  
   Container pane = getContentPane();
   pane.setLayout(new GridLayout(7,2));
  
  

   }
}

0 0
Add a comment Improve this question Transcribed image text
Answer #1

package com.HomeworkLib.swing;

import java.awt.Container;
import java.awt.GridLayout;

import javax.swing.JButton;
import javax.swing.JFrame;
import javax.swing.JLabel;
import javax.swing.JTextField;
import javax.swing.SwingConstants;

public class PropertyTax1 extends JFrame {
   private static final int WIDTH = 400, HEIGHT = 300;

   public PropertyTax1() {

      
       //PropertyTax1 proptax = new PropertyTax1();
       JLabel assessL = new JLabel("Assessment Home Value", SwingConstants.RIGHT);
       JTextField assessTFHome = new JTextField(10);
       JLabel assessLSchool = new JLabel("Decimal Value of School Tax Rate", SwingConstants.RIGHT);
       JTextField assessTFSchool = new JTextField(10);
       JLabel assessLCounty = new JLabel("Decimal Value of County Tax Rate", SwingConstants.RIGHT);
       JTextField assessTFCounty = new JTextField(10);
       JLabel assessLSchoolTax = new JLabel("School Taxes", SwingConstants.RIGHT);
       JTextField assessTFSchoolTax = new JTextField(10);
       JLabel assessLCountyTax = new JLabel("County Taxes", SwingConstants.RIGHT);
       JTextField assessTFCountyTax = new JTextField(10);
       JLabel assessLTotalTax = new JLabel("Total Taxes", SwingConstants.RIGHT);
       JTextField assessTFTotalTax = new JTextField(10);
       JButton exit = new JButton("Exit");      
       this.setLayout(new GridLayout(7, 2));
       this.add(assessL);
       this.add(assessTFHome);
       this.add(assessLSchool);
       this.add(assessTFSchool);
       this.add(assessLCounty);
       this.add(assessTFCounty);
       this.add(assessLSchoolTax);
       this.add(assessTFSchoolTax);
       this.add(assessLCountyTax);
       this.add(assessTFCountyTax);
       this.add(assessLTotalTax);
       this.add(assessTFTotalTax);
       this.add(exit);
       this.setTitle("Calculation of Property Taxes");
       this.setSize(WIDTH, HEIGHT);
       this.setVisible(true);
       this.setDefaultCloseOperation(EXIT_ON_CLOSE);
       this.show();

   } // end of the constructor method

   public static void main(String[] args) {

       new PropertyTax1();

       // proptax

   }
}

--------------

Add a comment
Know the answer?
Add Answer to:
Need some help fixing these compilation errors that start around line 20, thank you import javax.swing.*;...
Your Answer:

Post as a guest

Your Name:

What's your source?

Earn Coins

Coins can be redeemed for fabulous gifts.

Not the answer you're looking for? Ask your own homework help question. Our experts will answer your question WITHIN MINUTES for Free.
Similar Homework Help Questions
  • Basic button tracking Deliverables Updated files for app6.java myJFrame6.java myJPanel6.java student.java Contents You can start with...

    Basic button tracking Deliverables Updated files for app6.java myJFrame6.java myJPanel6.java student.java Contents You can start with the files available here. public class app6 { public static void main(String args[]) {     myJFrame6 mjf = new myJFrame6(); } } import java.awt.*; import javax.swing.*; import java.awt.event.*; public class myJFrame6 extends JFrame {    myJPanel6 p6;    public myJFrame6 ()    {        super ("My First Frame"); //------------------------------------------------------ // Create components: Jpanel, JLabel and JTextField        p6 = new myJPanel6(); //------------------------------------------------------...

  • There 2 parts to complete: import javax.swing.*; import java.awt.event.*; import java.awt.*; public class Q4 extends JFrame...

    There 2 parts to complete: import javax.swing.*; import java.awt.event.*; import java.awt.*; public class Q4 extends JFrame { private int xPos, yPos; public Q4() { JPanel drawPanel = new JPanel() { @Override public void paintComponent(Graphics g) { super.paintComponent(g); // paint parent's background //complete this: } }; drawPanel.addMouseListener(new MouseAdapter() { public void mouseClicked(MouseEvent evt) { //complete this :- set the xPos, yPos }    }); setContentPane(drawPanel); setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE); setTitle("Mouse-Click Demo"); setSize(400, 250); setVisible(true); } public static void main(String[] args) { SwingUtilities.invokeLater(new Runnable() {...

  • Simple java GUI language translator. English to Spanish, French, or German import javax.swing.*; import java.awt.*; import...

    Simple java GUI language translator. English to Spanish, French, or German import javax.swing.*; import java.awt.*; import java.awt.event.ActionEvent; import java.awt.event.ActionListener; public class translatorApp extends JFrame implements ActionListener {    public static final int width = 500;    public static final int height = 300;    public static final int no_of_lines = 10;    public static final int chars_per_line = 20;    private JTextArea lan1;    private JTextArea lan2;    public static void main(String[] args){        translatorApp gui = new translatorApp();...

  • I need help with the get quote sql that is all Build a rate quote GUI....

    I need help with the get quote sql that is all Build a rate quote GUI. The system will first allow us to select a customer (assume they are already in the DB), an employee giving the quote, and then select part(s) and/or motorcycles. You system should also include the shipping information in the quote. After all of the items have been selected for the rate quote, we should give the user a “bottom line” total that includes shipping (we...

  • GUI in java: Run the below code before doing the actionlistener: import java.awt.*; import javax.swing.*; public...

    GUI in java: Run the below code before doing the actionlistener: import java.awt.*; import javax.swing.*; public class DrawingFrame extends JFrame {    JButton loadButton, saveButton, drawButton;    JComboBox colorList, shapesList;    JTextField parametersTextField;       DrawingFrame() {        super("Drawing Application");        setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE);        JToolBar toolbar = new JToolBar();        toolbar.setRollover(true);        toolbar.add(loadButton=new JButton("Load"));        toolbar.add(saveButton=new JButton("Save"));        toolbar.addSeparator();        toolbar.add(drawButton=new JButton("Draw"));               toolbar.addSeparator();        toolbar.addSeparator();        toolbar.add(new...

  • Debug this java and post the corrected code. /* Creates a simple JPanel with a single...

    Debug this java and post the corrected code. /* Creates a simple JPanel with a single "quit" JButton * that ends the program when clicked. * There are 3 errors, one won't prevent compile, you have to read comments. */ import javax.swing.*; import java.awt.*; import java.awt.event.*; public class QuitIt extends JFrame {     public QuitIt() {         startIt(); //Create everything and start the listener     }     public final void startIt() {        //Create the JPanel        JPanel myPanel =...

  • import javax.swing.*; import java.awt.event.*; import java.awt.*; public class BookReview extends JFrame implements ActionListener {       private JLabel...

    import javax.swing.*; import java.awt.event.*; import java.awt.*; public class BookReview extends JFrame implements ActionListener {       private JLabel titleLabel;       private JTextField titleTxtFd;       private JComboBox typeCmb;       private ButtonGroup ratingGP;       private JButton processBnt;       private JButton endBnt;       private JButton clearBnt;       private JTextArea entriesTxtAr;       private JRadioButton excellentRdBnt;       private JRadioButton veryGoodRdBnt;       private JRadioButton fairRdBnt;       private JRadioButton poorRdBnt;       private String ratingString;       private final String EXCELLENT = "Excellent";       private final String VERYGOOD = "Very Good";       private final String FAIR = "Fair";       private final String POOR = "Poor";       String...

  • Modify the code to turn the text area background to the color YELLOW if you click...

    Modify the code to turn the text area background to the color YELLOW if you click an "x" (lower or uppercase)? package com.java24hours; import javax.swing.*; import java.awt.event.*; import java.awt.*; public class KeyViewer extends JFrame implements KeyListener { JTextField keyText = new JTextField(80); JLabel keyLabel = new JLabel("Press any key in the text field."); public KeyViewer() { super("KeyViewer"); set LookAndFeel(); setSize(350, 100); setDefaultCloseOperation (JFrame.EXIT_ON_CLOSE) ; keyText.addKeyListener(this); BorderLayout bord = new BorderLayout(); set Layout (bord); add (keyLabel, BorderLayout. NORTH); add (keyText, BorderLayout....

  • I tried to add exception handling to my program so that when the user puts in...

    I tried to add exception handling to my program so that when the user puts in an amount of change that is not the integer data type, the code will catch it and tell them to try again, but my try/catch isnt working. I'm not sure how to fix this problem. JAVA code pls package Chapter9; import javax.swing.*; import java.awt.*; import java.awt.event.*; public class GUIlab extends JFrame implements ActionListener {    private static final int WIDTH = 300;    private...

  • Can you please fix the error. package com.IST240Apps; import java.awt.*; import java.awt.event.*; import java.io.*; import javax.swing.*;...

    Can you please fix the error. package com.IST240Apps; import java.awt.*; import java.awt.event.*; import java.io.*; import javax.swing.*; import java.net.*; public class LinkRotator extends JFrame implements Runnable, ActionListener { String[] pageTitle = new String[5]; URI[] pageLink = new URI[5]; int current = 0; Thread runner; JLabel siteLabel = new Jlabel(); public LinkRotator() { setDefaultCloseOperation(Jframe.EXIT_ON_CLOSE); setSize(300, 100); FlowLayout flo = new Flowlayout(); setLayout(flo); add(siteLabel); pageTitle = new String[] { "Oracle Java Site", "Server Side", "JavaWorld", "Google", "Yahoo", "Penn State" }; pageLink[0] = getUR1("http://www.oracle.com/technetwork/java");...

ADVERTISEMENT
Free Homework Help App
Download From Google Play
Scan Your Homework
to Get Instant Free Answers
Need Online Homework Help?
Ask a Question
Get Answers For Free
Most questions answered within 3 hours.
ADVERTISEMENT
ADVERTISEMENT