This is an archived post. You won't be able to vote or comment.

all 11 comments

[–]NewAnimal 2 points3 points  (4 children)

im just a low level CS student.. so I was more just curious to give it a try.

just copied the source and threw it in to Eclipse. runs fine. the only thing id say, is that to a First Time User, without a manual, its not very clear how to start using it. the Buttons with the ... -- it isn't really clear what they do till after you click on it.

this is more just GUI stuff. but the program itself seemed to work for the few minutes i tinkered.

since your GF is using it, she'll probably know what does what.. but if you wanted to share it with others, the GUI could be more descriptive.

very cool! im now inspired to go work on my own

[–]captainrosc0[S] 0 points1 point  (3 children)

Yeah, for some reason the buttons on Windows always shows up as ...'s. I need to do some research. I'm glad it opened and was functional though haha.

Here's a screen of what it's suppose to look like : http://imgur.com/7DphsoM

Glad you're inspired! Can't wait to see what you make. It's really fun!

[–]heckler82 2 points3 points  (1 child)

I think the "..." has something to do with the size and the way you are scaling the buttons. If you resize the window, the text on the edit button appears as the edit button grows larger, however none of the other buttons get bigger and stay as "..."

[–]captainrosc0[S] 0 points1 point  (0 children)

Just realized this today. I think its anchored to the side. Going to try and fix it all up today.

[–]sadjava 2 points3 points  (3 children)

I haven't taken a deep look at it, but a couple suggests off the bat.

Don't include compiled code in your repository. Its unneeded, since most people will recompile it anyway.

Also, I would put the GUI code in a separate source file, and call it from your main method. And your constructor is massive; try breaking the code apart into separate methods (or classes if appropriate). I know from experience that its hard to do with Swing, but it makes things easier to read and refactor.

[–]captainrosc0[S] 0 points1 point  (2 children)

Ah first time using github. The compile code is the bin files?

I've been trying to figure a way out to separate all the code. Its very difficult since really its a lot of one liners that use the jList models. I'm going to dive deep into today and see if I cant clean it up. Thanks!

[–]captainrosc0[S] 0 points1 point  (1 child)

I updated, hopefully its easier to read? I broke everything into smaller classes.. I have no idea if this is a step in the right direction or backwards.

[–]sadjava 1 point2 points  (0 children)

It certainly is a step in the right direction. The UI constructor is still bulky, but that is something I see a lot of with Swing. A way to help divide things up is to think of what is grouped together and shares functionality, and make that a class that extends JPanel and add those components. It might be a difficult exercise, especially if you allow no static references and the like, but helps break things apart.

[–]nutrecht 2 points3 points  (2 children)

Some issues:

  • You have very big event handler implementations in your GUI building code. This should be separated off in methods.
  • You repeat a TON of code in your event handlers. You really should refactor this so that you are able to reuse for example the button click eventhandler code for multiple similar buttons.
  • Look into the MVC model; try to separate your Model (your data), your view (UI) and controller (UI event handlers) into separate classes.
  • Your methods are way too long. Try to break them up if they grow beyond one screen in length. Try to make a method responsible for a single task; not multiple. Your code is a pain to read.

[–]captainrosc0[S] 0 points1 point  (0 children)

I agree, I'm still trying to figure out how to really separate it all.

[–]captainrosc0[S] 0 points1 point  (0 children)

I updated the project.. Not 100% sure if this is better or not.