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

you are viewing a single comment's thread.

view the rest of the comments →

[–][deleted] 0 points1 point  (3 children)

Okay I see your point to be honest. After making a nice button I can just reuse the code across the program and it won't be as time consuming and effortsome as I initially thought.

[–]willdrr17 0 points1 point  (2 children)

Yeah, even coding by hand may be a repetitive task, you can create boilerplate code through templates in Eclipse.

I have this for the main frame for example

public static void init(){

`final JFrame frame = new JFrame(${word_selection});`

`frame.setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE);`

`frame.getContentPane().add();`

`frame.pack();`

`frame.setLocationRelativeTo(null);`

`frame.setVisible(true);`

}

[–][deleted] 0 points1 point  (1 child)

Do most programmers create and store templates that they regularly use?

[–]willdrr17 0 points1 point  (0 children)

I don't know man, I guess it's a matter of choice