Search:

Type: Posts; User: usherlad

Page 1 of 2 1 2

Search: Search took 0.08 seconds.

  1. Replies
    33
    Views
    3,653

    Re: How to remove a brick (Java)

    i don't know how to link classes together so i just used a method. The methos is called drawRectangle
  2. Replies
    33
    Views
    3,653

    Re: How to remove a brick (Java)

    yeah sure. I know have a button that adds the brick instead of the brick being added straight away. Only reason for this is because it states that in the assignment criteria.





    import...
  3. Replies
    33
    Views
    3,653

    Re: How to remove a brick (Java)

    I have finally managed to do it even though it may not be the correct way.

    I have done it for a brick i know the location of but now i want to try and improve it by having a randomly displayed...
  4. Replies
    33
    Views
    3,653

    Re: How to remove a brick (Java)

    I have it stored as a method. How do i store it as a variable?
  5. Replies
    33
    Views
    3,653

    Re: How to remove a brick (Java)

    nothing but it was meant to run the removeRectangle method



    Again nothing but i wanted it to be that if it was true then it wouldn't run the removeRectangle method



    yeah i see what you...
  6. Replies
    33
    Views
    3,653

    Re: How to remove a brick (Java)

    ignore what i previously. I have wrote this at class level.




    if ((x>=x1 && x<=x2) && (y==y1) && beenHit == false){
    removeRectangle();

    }else{
  7. Replies
    33
    Views
    3,653

    Re: How to remove a brick (Java)

    can i link a boolean and method together. For example:

    Boolen BeenHit = false

    .........

    if false
    drawRectangle()

    else
  8. Replies
    26
    Views
    3,330

    Re: Getting Pictures to Spin

    Thank you for all your help today Norm. I have just managed to get my pictures to spin. Sorry again if i have been frustrating

    Cheers
  9. Replies
    26
    Views
    3,330

    Re: Getting Pictures to Spin

    public void actionPerformed (ActionEvent event)

    {

    if(event.getSource()==btnBye){
    JOptionPane.showMessageDialog(null,"Thank You For Playing....Bye!!!");
    System.exit(0);
    }
    ...
  10. Replies
    26
    Views
    3,330

    Re: Getting Pictures to Spin

    I have managed to merge the if statements so it looks more tidy.

    I cant really make an array because i havnt learnt about these yet and its only testing us on what we have already learnt.

    I...
  11. Replies
    26
    Views
    3,330

    Re: Getting Pictures to Spin

    yeah i would like the three image displays to do that. Just like the SpinSimulator.

    oh i thought the coding for them was both the same and thought they would both have done that.

    Could you...
  12. Replies
    26
    Views
    3,330

    Re: Getting Pictures to Spin

    on the SpinSimulator program, when you click the button "Spin", it flicks through three pictures giving the effect that its spinning. When you click the button "Play" on the ElectronicSlot8 program...
  13. Replies
    26
    Views
    3,330

    Re: Getting Pictures to Spin

    sorry i meant everything but the timer. I don't know whether im blind or what but im confused as to why the pictures dont act the same as the pictures do in the SpinSimulator program.

    Yeah i have...
  14. Replies
    26
    Views
    3,330

    Re: Getting Pictures to Spin

    Everything works as how it should. I don't know whether the response i got from the timer was correct or not
  15. Replies
    26
    Views
    3,330

    Re: Getting Pictures to Spin

    i have tried what you said on timer and i got the following response:

    javax.swing.Timer@a3bcc1

    is that correct or not?

    I have given up on the hold buttons for now cause they've been making...
  16. Replies
    26
    Views
    3,330

    Re: Getting Pictures to Spin

    No i havn't. Stupid question here but how do i do that?
  17. Replies
    26
    Views
    3,330

    Re: Getting Pictures to Spin

    sorry that there is alot of code in there.

    the code that is meant to spin the pictures is:




    if(event.getSource()==btnStart){
    counter = 0;
    timer = new Timer(100,this);
  18. Replies
    26
    Views
    3,330

    Re: Getting Pictures to Spin

    Sorry, the code i just posted was for the program that works. What the program does is what i would like my other program to do but for some reason that i dont know of it wont. Instead of showing...
  19. Replies
    26
    Views
    3,330

    Re: Getting Pictures to Spin

    i suppose so yeah. So it would flicker through each of the pictures eventually stopping on a random one
  20. Replies
    26
    Views
    3,330

    Re: Getting Pictures to Spin

    Like you see the reels spin on a fruit machine.

    import javax.swing.*;
    import java.awt.*;
    import java.awt.event.*;
    class SpinSimulator extends JFrame implements ActionListener{
    private int...
  21. Replies
    26
    Views
    3,330

    Getting Pictures to Spin

    Hi,

    i have two programs where i want the pictures to spin. On one program the pictures spin and on the other they dont. The code is the same so im not sure whats going on.

    Program where...
  22. Replies
    3
    Views
    1,497

    Re: Hold feature on Fruit Machine

    i have given it a try but i dont understand why it wont work. I have set a timer for each real and when the hold button is selected the timer stops so that reel doesnt spin. However the reel still...
  23. Replies
    3
    Views
    1,497

    Hold feature on Fruit Machine

    Hi,

    I'm trying to write the code for a hold button on a fruit machine. Im not sure where to start or how to do it.

    Can anyone help me please and point me in the right direction

    Thank You
  24. Replies
    33
    Views
    3,653

    Re: How to remove a brick (Java)

    sorry if all my questions are stupid but im just trying to find out.

    is public static void main(String[] args) or public BouncingBall1(){ class level
  25. Replies
    33
    Views
    3,653

    Re: How to remove a brick (Java)

    so there is no way of linking the boolean in the moveBall method and the removeRectangle method?
Results 1 to 25 of 39
Page 1 of 2 1 2