Java homework help please :(

Discussion in 'Miscellaneous' started by britbrit3197, Apr 15, 2014.

  1. the code I posted is for Java fx and uses the Button method. It isn't for Swing which I believe uses the JButton.
  2. Never understood why that idea got started that beginners shouldn't use IDE's.

    I encourage beginners to use IDE's, as IDE's will show you what you did wrong immediately, and help you fix it, and give you much better details into WHY its wrong...

    This is extremely invaluable when you are completely new to a language, and will help you avoid LEARNING bad practices.

    One of the biggest things a beginner spends time on is trying to figure out WHY their code is broken, and an IDE telling you why is super time saving, cause its easier to figure out why when you see the correct way of doing it.

    "Roughnecking" and "Figuring it out on your own" is nice in theory, but I'm sure brit isn't paying colleges tons of money to learn programming to ultimately write "Learned programming in notepad" on resume.

    Saying your super efficient is much cooler than saying you wrote code in notepad :)
    (and so it's clear I'm ranting on the idea that beginners shouldn't use IDE's, not you personally shaving =P)
    607, mba2012 and gamerlord48 like this.
  3. This :D When I first started with java, I used Notepad++ and tried learning it that way. I spent so much time on the internet googling and reading through Java's documentation that by the time I found my answer, I had to stop coding and take care of other IRL responsibilites. However, after a while I started using eclipse, and the IDE features that show you the "reason" behind broken code is extremely helpful. Not only do you know what part is broken immediately, you can also go google the reason to get more info on it, instead of spending a ton of time finding the reason, then having to do more research on how to fix it.
    TL;DR
    IDE's can make coding much easier to learn and fix, by saving you time trying to find the cause (Basically what Aikar said)
  4. Hmm, that's true. Never thought about it that way. It is extremely helpful to see your compilation errors highlighted in "red squigglies". I guess I'm biased because many of the programming classes I took in college made us use Notepad. >.<
    gamerlord48 likes this.
  5. I have never done java in notepad. I love the way you can see what you do wrong as you do it and if you start to Type a method or variable, it will get to show you what you may be typing and give new things. This is extremely useful when I have an idea Of what I want but can't remember the parameters.
  6. I have notepad++ for website design i never thought about using it for java ._.
  7. Oh I'm sorta an oldie when it comes to programming too (been doing this for 12 years now), I started with Notepad too :p

    But back in those days, we didn't have these super fancy IDE's.

    It's not free, but IntelliJ IDEA Ultimate includes plugins for every language which includes PHPStorm/WebStorm for Web development/design.

    I have done my rounds trying to find the best web IDE, and IntelliJ IDEA(Or PHPStorm/WebStorm) has won this battle for me.

    As a student you can get a major discount too (half off)
    http://www.jetbrains.com/idea/buy/license-matrix.jsp
  8. I'm an Eclipse fan myself. Its strongest language is Java, but it supports other languages as well.

    Yeah...I remember writing BASIC programs in MS-DOS when I was a kid lol
    607 likes this.
  9. xD yeah I use Notepad for my web sites, and TextPad for java but i find textPad doesn't really explain what's wrong. For C++ i use Code::Blocks and its amazing but it only works with C++ and C#.
  10. If you don't understand fundamental coding, I wouldn't recommend starting with java ... you'd need to understand how it is applied, and what it means, before you understand how it works...

    Just like a light switch ... you'd first see it and be like 'okay, i can flip this and it turns on and off' ... now let me look at how the electrical system actually works' ... it would be more difficult to start out with learning how to build the wires, build all of the inner works and stuff without knowing what they are for (the light switch) ...

    idk if that's a good example ... but basically i'd recommend for tabbing purposes to stick with notepad++

    but if you want a visual representation of c# i'd recommend you to use visual studios - you have the gui right there, can add your buttons, text boxes, etc ... then open up each individual item you added, and look at the coding and configure it.

    alternatively instead of c# visual representation, you could use Alice, which is a drag and drop system to show how things take place, and what each event or syntax does.

    once you start understanding what the variables, expressions, events, conditions, types, loops, etc are in the application, in the coding ... then you'll understand what they are used for ...

    once you understand what each thing is used for ... then i'd say you'd be ready to use an IDE ... like intellij, netbeans, or eclipse ....

    I personally use Netbeans, I know others like the other two ... but honestly, if you don't know at least the fundamentals, you'll be lost starting out with an ide.
    gamerlord48 likes this.
  11. Thanks for the help but....i know how to code :confused: I already know C++ like the back of my hand so i know loops expressions variables ect... I just needed help with how to get the GUI to work I got it now though.

    I have used Netbeans I really didn't like it even though it was a good program, I usually work with eclipse but my teacher strictly wants us to use TextPad so ive been trying to do everything on that since our Finals and test at school thats all we have. I know the code but when GUI and user interface is involved i get the classes mixed up i think
  12. That looks a lot like Sublime Text, which is what I use for HTML/CSS
  13. I'd pick Java. Don't like either language, but I just loath C#...
  14. Yeah Java is used in everything but i would pick C++ over anything xD, ive seen C# but haven't worked with it much
    mba2012 likes this.
  15. C++ is amazing :p
  16. Contrary to popular belief ... c# is used just as much, if not more than java on mobile devices... c# is used in older phones and windows phones, and even some ios device ... java can be used with android and ios ...

    I've made mobile phone applications, and I've seen c# used most often - and possibly more compatible with the phones than java.