Week 29 – GUI and Swing

GUI is learned late in the game with Java.  Do you think this is helpful or harmful and why?

Gosh… I think it took a while to get here. I think we should be looking into swing a lot earlier, but I also realize my team had a bit of a struggle working through it. So without a solid foundation, it’s very difficult to wrap your head around. I wish we spent more time writing swing programs, specially when you can visualize arrays or understand other concepts while also progressing through GUI portion. I would have loved to worked on small programs that are just useful in real life first, rather than this huge game that has so much logic attached to it.

Why do think that coding the Swing elements in Java would be more difficult compared to some other languages?

No clue… I have never worked with GUI’s in any serious level. I was surprised by two things about swing:

  1. How easy it is to add elements to the interface and build a working program that responds to actions.
  2. How clunky it is to add any meaningful layering of elements.

Building the functionality in swing was surprisingly easy and intuitive using inner classes, and listeners and actions. I really enjoyed how just trivial hooking a button up or displaying text was. I was also surprised how many layers, classes, nesting and management it required to get anything beyond a basic element. Once you start throwing layouts, or fonts, or any sort of meaning styling, your code explodes into this nightmare of classes elements and nesting. I would hope other frameworks and languages have learned from this, and made it easier to achieve a working interface.

Update your learning journal from what you experienced this week with class. 

This week was so much better than last… My team had a lot better communication. We worked through problems together, and made sure as a team that the program was working. I’d say of all the programs this was not only the most difficult to code, but also the most difficult to plan around. I feel the class tugs between “do what you think it’s best” and “follow my very specific instructions” which is a very tight line to walk and I do feel is a bit unfair.

On the other hand, working through swing was super fun. I really enjoyed the overall concept of the assignment though making a game in it is a big disservice to the framework. But, as someone who had maybe done one GUI in C++ many years ago, I found it incredibly fun to delve into this side of client side programing. After this, I’m far more inclined to dig a bit deeper into QT or stick with swing but give more of this GUID stuff a try at home. I bet I could create a few interfaces for my own stuff at home!

I’m actually very excited about next week. If this one was any indication, it will be a world of pain, but I have never worked with android and I’m very much looking forward to making a program I can run in a device!

This entry was posted in CST-338, CSUMB. Bookmark the permalink.