Learning Journal Unit 7 1 PDF

Title Learning Journal Unit 7 1
Author Rhhme Visitudele
Course Programming 2
Institution University of the People
Pages 4
File Size 108.7 KB
File Type PDF
Total Downloads 34
Total Views 133

Summary

Regard Learning Journal Assignment Unit 7 1 CS 1102 or Programming 2....


Description

Learning Journal Unit 7 This week in Unit 7 I learn many things from all assignments from (discussion assignment, programming assignment) and all reading materials available for this week. I watch the one videos that were available in the module, this all serves as a guide to me, however, in alongside I still do not understand some basics or in say concept so I had tried to reach out to my classmate and indeed they gave me a feedback that was so helpful and amazing.

From this week's reading material, such as Section 13.3: Actions and Buttons, Section 13.4: Complex Components and MVC, and Section 13.5: Finishing Touches. I learn many things like about the complex components and the MVC. Moreover actions and buttons. For understanding the MVC pattern for designing GUIs. The actions are defined to use in the class AbstractAction. They have an advantage to the action such as the code organization meaning is represented object and the key action there's the possibility to the associate of an Action with any key of it. Moreover, it re-uses meaning it to be used to the other place of JAVA API. The radio button is defined as the object type likes JRadioButton. Moreover is acts as well as the JCheckbox. However, it is the same events and methods. The group radio button has defined by the class as ButtonGroup. Nevertheless does not itself to visible to the representation on the screen of it. The class JRadioButton is menu item meaning it can add then the equivalent to a group of the Radio Buttons. The JTextFields and JLabels is a component of the toolbar. Moreover, the toolbar is present to the small icons with no text of it. The toolbar is the row of the small along to the edge to the program window to it. There's toolbars components and class such as JTextFields and JLabels. Moreover JToolBar and BorderLayout. The Keyboard accelerators are equivalent to the menu command. Likes Ctrl-Z is using the Undo command. The class java. swing keystroke meaning is used to type a keyboard. Moreover, there is a key control likes Alt, Meta, and Shift. The HTML meaning the text can format display to the button. Moreover, it will display as well as a multiple-line text of it. The MVC – Mode-View-Controller, meaning it is a design pattern into the swing component. The JList is defined as the list of the item to be selected by the user. Moreover the JList and JTable is represent the collection of the item of the user. From the JTable is use to the object type through TableModel into the store information reading to contents of the table of it. Furthermore, the JTextComponent display text is optional it will be edit to the user. They have subclass such as JTextField single line of text, and JTextArea its hold multiple lines. Moreover, JEditorPane supports to display and editing style text. Furthermore, JEditorPane works with the basic HTML docs.

I learn many things in Unit 7. I learn how to work in the IDE and other Java environments (net beans), I learn how to run codes avoiding both syntax and semantics error and debugging above all. Moreover, I learn the fundamentals and things I should expect as a programmer while running my codes. This was what guided me while doing my programming assignment, first I

created a file then created a class, and made my inputs.

The whole process was surprising but alongside challenging, I had issues in my programming assignment while doing my code. I notice it. It’s difficult to understand Unit 7. I try my best to fix the code because is not working if run to it. I ask some of my classmates to assist me with the assignment so that I can understand clearly. The good thing is my classmate assisted me in the assignment. You need to be more patient in this kind of situation and ask for help if needed. Everyone in this course was very helpful to each other. I learn lots of things about this Unit 7 very interesting topic.

From the course syllabus and the structure set in the class, I can say I’m gaining and I learn many things, new things in each unit. The programming world is very mysterious and interesting you need to solve every code it’s problem-solving. It applies as well in personal life the same as a code or program. Each code they have a different character or ability. I need to learn more about these things so that I will be able to read the code easily and practice more of it. In this whole Unit 7very challenging moreover, it was fantastic and very interesting. Reference Eck, D. J. (2019). Introduction to programming using Java, version 8.1. Retrieved from http://math.hws.edu/javanotes.

This is a graded exercise that should be posted to your learning journal. The StopWatchLabel component from section 12.4.5 in the textbook displays the text "Timing..." when the stopwatch is running. It would be nice if it displayed the elapsed time since the stopwatch was started. For that, you need to create a Timer (see section 6.5.1 in the textbook.) Add a Timer to the original source code, StopWatchLabel.java in the code directory, to drive the display of the elapsed time in seconds. Create the timer in the mousePressed() routine when the stopwatch is started. Stop the timer in the mousePressed() routine when the stopwatch is stopped. The elapsed time won't be very accurate anyway, so just show the integral number of seconds. You only need to set the text a few times per second. For the Timer method, use a delay of 200 milliseconds for the timer. Here is an applet that tests one possible solution to this exercise: Answer import java.awt.event.*; import javax.swing.*; /** * The component to actings a simple to stop-watch.

*Furthermore when the user will click of it, * the component starts for the timing. *Moreover when the user to clicks again, * it should display to the timing between for the two clicking. * Clicking on the third time it will start to another timers and other things. */ public class StopWatchLabel2 extends JLabel implements MouseListener, ActionListener { private long startTime; // Start time of time private boolean running; // It is true when the timer is running. /** * The constructor sets to an initial text *to the label to click so that it can start the timer. */ public StopWatchLabel2() { super("You should click to start timer. ", JLabel.CENTER); addMouseListener(this); }

/** * It would tell you of the timer is currently running to it. */ public boolean isRunning() { return running; }

/** * It would be reacting when the user presses of the mouse it starting to it, * either to stopping to stop watch and changing to the text that * it should represent to the label of it. */ public void mousePressed(MouseEvent evt) { if (running == false) { // The record of the time and start the stop watch.

running = true; startTime = evt.getWhen(); //the time when mouse was clicked. } else { running = false; long endTime = evt.getWhen(); double seconds = (endTime - startTime) / 1000.0; setText("Time: " + seconds + " sec."); } } public void mouseReleased(MouseEvent evt) { } public void mouseClicked(MouseEvent evt) { } public void mouseEntered(MouseEvent evt) { } public void mouseExited(MouseEvent evt) { } }...


Similar Free PDFs