Hello,
I'm just trying to make a rectangle move over the horizontal direction. Below you can find the code I have written, but it doesn't work when I click drop-button.
I don't understand why it...
Type: Posts; User: ICEPower
Hello,
I'm just trying to make a rectangle move over the horizontal direction. Below you can find the code I have written, but it doesn't work when I click drop-button.
I don't understand why it...
I'm trying to simulate a falling object with an initial horizontal speed. I understand how to make it move horizontally (no acceleration) but I have some trouble making it move vertically because of...
Thank you for the reply.
so I did addActionListener(this) to every button and implemented ActionListener with actionPerfomed method.
But I don't understand fully how to change the Card now in...
I want to switch between JPanels by clicking buttons on the JPanels.
For example:
I have a JPanel sim with a JButton simknop and a JPanel help with JButton helpknop
I want to switch between...
The only other class I've made is a JFrame to show a GUI, except that I haven't written any other program.
I still don't understand why it doesn't recognize actionperformed for the Button but I...
I don't think I understand the problem, but I also don't really understand what you're saying about a program that shows the problem. I'm kind of really new to Java.
Thank you for the help though!
When I click a button, suppose PLAY, it should print out "hello". It doesn't do that, so I think the THIS in knop.addActionListener(THIS) is for the ActionListener and is supposed to be written in...
If I modify the constructor like this (with JButton knop) the ActionListener works and does print "Hello" like it is written in the actionPerformed method.
so from that I can see that the problem...
It doesnt give an error message, the ActionListener just doesn't work. When I click a button it does nothing..
Thank you for your response!
public class MainMenu extends JPanel implements...
Hello,
I'm trying to write a method that makes a JButton and adds actionlistener but it doesn't work.
The code below is written in a Class that extends JPanel implements ActionListener.
I...
Thank you, I think I will have to read more about paintComponent method. I wanted to try it with the BalPaneel variable since our teacher said that was one way you could make it work (the way we did...
Hi,
I'm new here and am just starting programming Java. (Started last year but failed :( )
I'm trying to figure out why my code doesn't work. I get the JFrame and JPanel but I just wanted to test...
This line doesn't work when I do 'startsnelheid = 0;' in BeginsnelheidPaneel. Whatever I type 'startsnelheid' equals to 0 in SimulatiePaneel...
If you look at the code of SimulatiePaneel, you'll see what the idea is.
I have a car and 'startsnelheid' is it's startvelocity. So when startsnelheid has a value for example 5. the car should be...
public BeginsnelheidPaneel(FlashedFrame fframe, double startsnelheid)
{
this.ff = fframe;
this.setLayout(null);
.
.
.}
this also doesn't work because that only listens to what's in the...
So what you are saying is:
That's something that I had already done and it didn't work. That's why I suggested to make a new variable.
Please can someone help me out with this? I really don't see why it doesn't work. I tried everything I know of doing
What I understand from what you just said is:
I should make a new variable x in BeginsnelheidPaneel, and in the constructor of BeginsnelheidPaneel I should equal x to startsnelheid. And in...
Thnx guys. As i already said i'm new to java. I read the link you uploaded but I still can't figure out why my code is not working.
I do t get any errors but I know that the value of...
Hi everyone,
I'm new on this forum and also with Java. I was wondering if someone could help me out with this problem i'm having.
I have 2 classes and I need to use a variable from one class in...