Jump to content

Explv's Scripting 101


Explv

Recommended Posts

7 hours ago, Jacksonpm23 said:

Starting this now. Looks like the most recent guide for this I could find off google haha.  If my computer ends up on fire I blame you <3
Do you think codeacademy or something is a good place to fulfill that pre-requisite? @Explv

I started doing Java with 0 knowledge, just google & osbot help.

Thank you Explv & Apae hehe.

PM me your discord if you need any help

Link to comment
Share on other sites

8 hours ago, Jacksonpm23 said:

Starting this now. Looks like the most recent guide for this I could find off google haha.  If my computer ends up on fire I blame you <3
Do you think codeacademy or something is a good place to fulfill that pre-requisite? @Explv

I learned the basics of Java quite a few years ago (from a big fat book), so I'm not really the best person to ask about current tutorials. I would have thought codeacademy is decent enough. You don't need loads of knowledge to start scripting, and you'll mainly learn from trying to build things and making mistakes.

Link to comment
Share on other sites

7 hours ago, Explv said:

I learned the basics of Java quite a few years ago (from a big fat book), so I'm not really the best person to ask about current tutorials. I would have thought codeacademy is decent enough. You don't need loads of knowledge to start scripting, and you'll mainly learn from trying to build things and making mistakes.

Haha I'll pick up one of those at the used book store sometime then. Thanks. I'm excited. And @atoo sure ill pm you it 

Link to comment
Share on other sites

@Explv I'm new to java and making GUI's. Have som questions :)

1) Why do you add the JDialog mainDialog/JComboBox<> treeSelector to the main class instead of the constructor method? The main dialog is accessed in the other methods, - but the ComboBox also? no? So, why declare it in the scope of the class and not just in the constructor instead? :o 

 private final JDialog mainDialog;
 private final JComboBox<Tree> treeSelector;

2) Also when I declare all of the JPanels, the JLabel and all the other instances to the class scope, and then reference them in the constructor, the Start button won't show up when I run with main() method ( main(String...args) )? Why is this? :I 

3) When I just declare and create the instances inside the scope of the constructor, like you did with the mainPanel etc., everything works fine. Why? 

What is the difference, and why do you do it like this? Can you elaborate? :)

 

Edited by t0r3
Link to comment
Share on other sites

  • 4 weeks later...
  • 4 months later...
  • 2 months later...
  • 3 weeks later...

Wow thanks so much for taking the time to make this guide.

I ran into trouble with the GUI at the very end (the enum Tree objects were giving me trouble back in my main class).

But here's how I fixed it in case anyone runs into the same issue:

I deleted the enum and changed the Tree objects into Strings. Then just add the Strings individually into the JComboBox.

GUI Class:

Untitled.jpg.1e7acf697813404ccc001ac8d0736f4d.jpg

Main Class:

Untitled2.jpg.c18fae1bc539970caf5ad6ea2ae19b60.jpg

 

(i know this may be less efficient/elegeant/conventional... but it seemed much more beginner-friendly to me)

Link to comment
Share on other sites

  • 4 months later...
  • 1 month later...
  • 1 month later...
  • 1 month later...
  • 5 weeks later...

Thanks for the guide.
I wrote my first script with this! :)

On 8/26/2020 at 9:03 AM, mitsuki said:

I've built it in intellij, but the script isn't showing up in the script selector? Any ideas? cheers for the guide btw 

 

Make sure you've got the output directory filled out correctly.
I know I had a couple silly mistakes because I went to fast.

Edited by Kalapeno
  • Like 1
Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...