Tuesday, April 9, 2019

CST 338 M5 Software Design


GUI is learned late in the game with Java. Do you think this is helpful or harmful and why?
Why do think that coding the Swing elements in Java would be more difficult compared to some other languages?
Update your learning journal from what you experienced this week with class.
I don't think it is harmful to learn GUI later in Java. It is essential to learn the basics and build on those. Knowing object oriented programming makes larger projects easier because of its reusability. In my App-Development class we learned how to use GUIs but they were largely drag-and-drop. Aside from the use of mouse and click listeners, they are similar.
I am not familiar with the Swing elements equivalents in other languages. If there are libraries, it will probably be no issue. In Python, there are many GUI frameworks like TkInter and other cross platform options like Jython, an implementation of OOP in Python integrated with Java and PyGame, an introduction to game programming. According to some guy on Stackexchange, Java needs to be installed on the computer for it to work, MacOSX has some issues occasionally with it, multi-threading isn’t compatible with it, and the knowledge doesn’t transfer to UI development in other languages.This week, we learned about Swing and Event-Driven programming. Swing is a package that is a better version of the Java Abstract Window Toolkit but doesn’t replace it and is sometimes needed to use Swing. Event driven programming is a form of OOP that uses an event to signal a listener. We also learned about User Interface design by analyzing layout managers, using menus, buttons, text fields, and text areas in GUI programs. A layout manager describes how the components are arranged which include BorderLayout, FlowLayout, and GridLayout. A menu is a, object of the class JMenu filled with menu items which is identified by a string and displayed. A button is from the class JButton which is derived from the abstract class AbstractButton. Objects from the Dimension class are used with buttons and other objects to specify a size in pixels. TextFields are objects from the JTextField class which are used to enter one line of text. Text areas are objects from the JTextArea class and are used to enter multiple lines of text which can be line wrapped using the setLineWrap method. TextFields and TextAreas can be made uneditable using .setEditable(false or true).

No comments:

Post a Comment

cst 499 week 8

This week, we finished writing the paper in order to do the best job possible even if it was a little bit late. Now that everything is done,...