This tutorial will show you how to create shapes in Java without a visual editor. I will use 2 classes because i prefer to keep my drawing class separate from the other classes. This way the drawing class, does just that, draw.
hey! I ve seen many of your java gui tutorials. They have helped me. I ve been looking all over the internet to find how can i make a JButton be clicked only once and with no luck. The setEnabled method doesnt work for me.. Is there anything else?
Great!!!!!! repaint() is what I've been looking for all over the internet. I hate my CS teacher. She could have taught us this easy method instead of all the jumbo mambos. Theory oriented people sucks!!! Thank you again. Plz keep up the good work.
@tuhinbhatt1 Simply go to the actionListener of the button and load up the new class there. You can create a new object from the other class file that will load the constructor of the new class, which will then load all the methods on the other class. You can also create a new frame in the actionListener, simply by JFrame frame = new JFrame("frame"); and you can also close the current frame by thisFrame.dispose();
@thewhiteone102
I know your comment was from 5 months ago, but hopefully I can help someone else.
The "shapes.java" and the "draw.java" have to be in the same package for that to work.
cheeseonamonkey 1 month ago
hey! I ve seen many of your java gui tutorials. They have helped me. I ve been looking all over the internet to find how can i make a JButton be clicked only once and with no luck. The setEnabled method doesnt work for me.. Is there anything else?
aproblepto222 2 months ago
you make me think i am in aeroplane...jesus,i can give you my microphone...
Meraklis56 2 months ago
Great!!!!!! repaint() is what I've been looking for all over the internet. I hate my CS teacher. She could have taught us this easy method instead of all the jumbo mambos. Theory oriented people sucks!!! Thank you again. Plz keep up the good work.
fuckthegmail 3 months ago in playlist Java Swing/GUI Tutorial/Help without Visual Editor
when ever i try to run this a frame just shows up and its blank
Magnamite9 3 months ago
Thanks, this really helped me out with a Checkers Game Project I'm creating.
excessiveforce03 3 months ago
@tuhinbhatt1 Simply go to the actionListener of the button and load up the new class there. You can create a new object from the other class file that will load the constructor of the new class, which will then load all the methods on the other class. You can also create a new frame in the actionListener, simply by JFrame frame = new JFrame("frame"); and you can also close the current frame by thisFrame.dispose();
MrJavaHelp 4 months ago
@ultravanz have you found the answer(How to make a button another class file
tuhinbhatt1 4 months ago
how do you make a button open another class for you?
ultravanz 6 months ago
Great vid.. good job
jeremyl3763 6 months ago