Okay thank you, I'm further now and I managed to make a button.
My code:
JButton zwart = new JButton("Zwart");
add(zwart, BorderLayout.PAGE_START);
KnopHandler kh = new KnopHandler();...
Type: Posts; User: MartijnSpurs
Okay thank you, I'm further now and I managed to make a button.
My code:
JButton zwart = new JButton("Zwart");
add(zwart, BorderLayout.PAGE_START);
KnopHandler kh = new KnopHandler();...
Programming is frustrating haha, I worked for 5 hours on this piece of code.
g.setColor(Color.RED);
This will set the ovals to another color, but the problem is that I can't add a JButton...
Thank you for the guides, I'm really a beginner in Java and I find it also hard to read English articles but I read them and I understand what they mean but like when I try to fix my code it won't...
Sorry but how can I use the highlight tags?
And I know the general rules for adding a JButton but I can show with a picture what happens.
Before adding a simple JButton:
2143
After adding...
Hello, I'm making a Java code for school but unfortunately I have some issues.
This is my script til now on:
import java.awt.*;
import javax.swing.*;
import javax.swing.event.*;