/************************************************************** /* Program Name: Lab 6 View /* /* Student Name: (fill in your name) /* Semester: Spring 2020 /* Class-Section: CoSc10403-(fill in your section number) /* Instructor: (fill in your instructor) /* **************************************************************/ import java.awt.*; import java.awt.event.ActionEvent; import java.awt.event.ActionListener; import java.awt.event.ItemEvent; import java.awt.event.ItemListener; import java.text.DecimalFormat; import javax.swing.*; public class Lab6View extends JFrame { JTextField dataN = new JTextField(); JButton dataB = new JButton("Submit"); JLabel dataL = new JLabel("Number of Elements #"); double[] data; //vector one double[] data2; //vector two JTextField[] disFields; JTextField[] disFields2; JFrame vF1; JFrame vF2; JButton rv1B = new JButton("Read 1"); JButton rv2B = new JButton("Read 2"); JButton addB = new JButton("Add 2 to 1"); JButton dotB = new JButton("Scalar"); JButton matrixB = new JButton("Matrix"); JButton clearB = new JButton("Reset"); public Color TCUColors = new Color(77,25,121); JPanel dataP = new JPanel(); JPanel data2P = new JPanel(); JPanel resultP = new JPanel(); JPanel numPanel; JPanel num2Panel; JPanel resPanel = new JPanel(new GridLayout(1,5)); JPanel res2Panel = new JPanel(new GridLayout(1,5)); int numData; boolean verbose = true; public DecimalFormat decimal = new DecimalFormat("###,###.##"); public static void main(String args[]) { // Construct the frame new Lab6View(); } public Lab6View() { setTitle("Vector Operations"); dataN.setText("0"); setFont(new Font("Helvetica",Font.BOLD,18)); dataL.setFont(new Font("Helvetica",Font.BOLD,18)); setLayout(new BorderLayout()); dataP.add(dataL);dataP.add(dataN);dataP.add(dataB); dataP.setBackground(TCUColors); dataL.setForeground(Color.WHITE); add("North",dataP); setBounds(50,50,600,100); setVisible(true); validate(); System.out.println( "here"); } }