No one has voted on any posts yet. Votes from other community members are used to determine a member's reputation amongst their peers.
good day everyone... can you give me a code for mouse listener i really appreciate it example.... the mouse is moving right or left the image will follow the mouse here's the image....... |
|
Good Day... the problem is that the Jbutton is not displaying in my Jpanel. can you help me, this will help me a lot, Thanks Here's the code [CODE] import javax.swing.*; import java.awt.event.ActionEvent; import java.awt.event.ActionListener; import java.net.URL; import javax.swing.JButton; import javax.swing.JOptionPane; public class GameBoard extends JPanel implements ActionListener { JButton … |
|
I'm newbie in java, can you help me to this code. the image needs to move diagonally [CODE]public void actionPerformed(ActionEvent e) { x += 3; if (x > 600) { y = random.nextInt(600); x = random.nextInt(-45); star.setX(x); star.setY(y); }[/CODE] |