SophiaPretty

(5)

$14/per page/Negotiable

About SophiaPretty

Levels Tought:
Elementary,Middle School,High School,College,University,PHD

Expertise:
Accounting,Algebra See all
Accounting,Algebra,Applied Sciences,Architecture and Design,Art & Design,Biology,Business & Finance,Calculus,Chemistry,Communications,Computer Science,Economics,Engineering,English,Environmental science,Essay writing Hide all
Teaching Since: Jul 2017
Last Sign in: 304 Weeks Ago, 2 Days Ago
Questions Answered: 15833
Tutorials Posted: 15827

Education

  • MBA,PHD, Juris Doctor
    Strayer,Devery,Harvard University
    Mar-1995 - Mar-2002

Experience

  • Manager Planning
    WalMart
    Mar-2001 - Feb-2009

Category > Computer Science Posted 09 Nov 2017 My Price 10.00

The fourth programming project involves writing a program

I need help writing the following code as directed by the pdf file. I have the GUI created, but none of the other code

  • package Graphs;

    import java.awt.BorderLayout;
    import java.awt.Color;
    import java.awt.GridLayout;
    import java.awt.event.ActionListener;
    import java.text.ParseException;
    import java.util.logging.Level;
    import java.util.logging.Logger;

    import javax.swing.BorderFactory;
    import javax.swing.JButton;
    import javax.swing.JFrame;
    import javax.swing.JLabel;
    import javax.swing.JPanel;
    import javax.swing.JScrollPane;
    import javax.swing.JTextArea;
    import javax.swing.JTextField;

    public class GUIGraph extends JFrame {
       
        private JLabel fileNameLabel;
        private JLabel classLabel;
        private JTextField inputFileTxt;
        private JTextField inputClassTxt;
        private JScrollPane scrollPane;
        private JTextArea outputText;
        private JButton buildGraphBtn = new JButton("Build Directed Graph");
        private JButton topologicalBtn = new JButton("Topological Order");

        public GUIGraph() throws ParseException{
           
            super("Class Dependency Graph");
            setSize(500, 250);
            setLocationRelativeTo(null);
            setResizable(false);
            setDefaultCloseOperation(EXIT_ON_CLOSE);
           
            fileNameLabel = new JLabel("     Input File Name: ");
            classLabel = new JLabel("     Class to Recompile: ");
            inputFileTxt = new JTextField();
            inputClassTxt = new JTextField();
          
            outputText = new JTextArea(7, 40); //size of the output text area
           
            //allow user input
            inputFileTxt.setEditable(true);
            inputClassTxt.setEditable(true);
           
            //Create top panel
            JPanel buttonPanel = new JPanel();
           
            buttonPanel.setBorder(BorderFactory.createLineBorder(Color.gray));
            buttonPanel.setLayout(new GridLayout(2,3,10,10)); //row, col, hgap, vgap
     
            buttonPanel.add(fileNameLabel);//row 1, col 1
            buttonPanel.add(inputFileTxt);//row 1, col 2
            buttonPanel.add(buildGraphBtn);//row 1, col 3
            buttonPanel.add(classLabel);//row 2, col 1
            buttonPanel.add(inputClassTxt);//row 2, col 2
            buttonPanel.add(topologicalBtn);//row2, col 3
            add(buttonPanel, BorderLayout.NORTH);
           
            //Create bottom Panel
            JPanel textPanel = new JPanel();
            //output pane
            scrollPane = new JScrollPane(outputText);
            textPanel.setBorder(BorderFactory.createTitledBorder("Recompilation Order"));
            textPanel.setBackground(Color.white);
            textPanel.add(scrollPane);
            add(textPanel, BorderLayout.SOUTH);
           
           
     
        }
       
        public static void main(String[] args) {
            java.awt.EventQueue.invokeLater(() -> {
                try {
                    new GUIGraph().setVisible(true);
             
                } catch (ParseException ex) {
                    Logger.getLogger(GUIGraph.class.getName()).log(Level.SEVERE, null, ex);
                }
            });
       
        }
    }

Attachments:

Answers

(5)
Status NEW Posted 09 Nov 2017 01:11 PM My Price 10.00

----------- He-----------llo----------- Si-----------r/M-----------ada-----------m -----------Tha-----------nk -----------you----------- fo-----------r y-----------our----------- in-----------ter-----------est----------- an-----------d b-----------uyi-----------ng -----------my -----------pos-----------ted----------- so-----------lut-----------ion-----------. P-----------lea-----------se -----------pin-----------g m-----------e o-----------n c-----------hat----------- I -----------am -----------onl-----------ine----------- or----------- in-----------box----------- me----------- a -----------mes-----------sag-----------e I----------- wi-----------ll -----------be -----------qui-----------ckl-----------y

Not Rated(0)