I want simply just create a button in Netbeans IDE without importing JButton class,I want to know how it's done. I want to know how boring it is, if we don't use libraries. I know it's a lot of code just for a simple GUI button but I am curios about that. I can find the source code for JButton, but I don't know how to enter the code in Netbeans.
Asked
Active
Viewed 825 times
-3
-
1I think this is a good question and curiosity, maybe duplicate. So downvoting this question is not required. – Aman Aug 11 '17 at 06:08
-
2Run this [example](https://stackoverflow.com/a/14429304/230513) in your IDE's debugger. – trashgod Aug 11 '17 at 09:23
-
1(1-) `but I don't know how to enter the code in Netbeans.` - what do you mean? It is a source file like any other source file you would create. – camickr Aug 11 '17 at 13:40
1 Answers
2
libraries are meant to save your additional efforts and time. But it is good you are thinking in this way. One thing you can do is to download a decompiler and use it to open the jar file containing the JButton class file and read its code and get an idea.
Also you can refer to this link for custom button creation. :-)
Link: Creating a custom button in Java

Aman
- 735
- 1
- 6
- 19
-
1Follow this link: http://developer.classpath.org/doc/javax/swing/JButton-source.html – Aman Aug 11 '17 at 04:59
-
1@OmerIsmail brother no one in SO will going to tell you how to put a certain code in IDE. It is a basic understanding. You have to figure it out on your own. Hope you understand. :-) – Aman Aug 11 '17 at 06:06