Search:

Type: Posts; User: SagiIs

Search: Search took 0.18 seconds.

  1. Replies
    6
    Views
    258

    Re: Problem with Controls because of buttons

    I tried to set it as unfocusable but it didn't help,got any other ideas?
  2. Replies
    6
    Views
    258

    Re: Problem with Controls because of buttons

    I thought it was about focus as well,do you know how to set as unfocusable?
  3. Replies
    6
    Views
    258

    Problem with Controls because of buttons

    Hi,I got an application that contains buttons that when pressed,draw a figure.For example,if the "triangle" buttons is pressed then a triangle is drawn.I tried to add controls so that the figure that...
  4. Replies
    33
    Views
    1,441

    Re: repaint() event does not work.

    Actually I did,I already showed you the code,I do use a panel for the buttons and a drawing area.
  5. Replies
    33
    Views
    1,441

    Re: repaint() event does not work.

    I actually ran the code before,my problem is running that code with the buttons.
  6. Replies
    33
    Views
    1,441

    Re: repaint() event does not work.

    I see,thanks a lot man you helped me a lot
  7. Replies
    33
    Views
    1,441

    Re: repaint() event does not work.

    I added what you said and now it works but it is opened in a separate window,I need it to work in the window which contains the buttons.
  8. Replies
    33
    Views
    1,441

    Re: repaint() event does not work.

    I did it in the MovePingPong class.
  9. Replies
    33
    Views
    1,441

    Re: repaint() event does not work.

    I don't understand,I thought I did it as well.
    Does the changed class look like this?



    import java.awt.Color;
    import java.awt.Graphics;
    import java.util.Timer;
    import java.util.TimerTask;...
  10. Replies
    33
    Views
    1,441

    Re: repaint() event does not work.

    I changed the drawPingPong method to an Override paint method.The method is entered when compiled but the same affect,the screen is only updated when the button is pressed again,the repaint() does...
  11. Replies
    33
    Views
    1,441

    Re: repaint() event does not work.

    Isn't that exactly what I did in MovePingPong class?
  12. Replies
    33
    Views
    1,441

    Re: repaint() event does not work.

    I don't override any paint methods because my drawing method is in a Panel class.If repaint() only works with the overrided paint method then what should I do to update the screen and create an...
  13. Replies
    33
    Views
    1,441

    Re: repaint() event does not work.

    There are classes I use here which I didn't think that are relevant.
    Picture:



    import java.awt.Color;
    import java.awt.FlowLayout;
    import java.awt.Graphics;
    import java.awt.Panel;
  14. Replies
    33
    Views
    1,441

    Re: repaint() event does not work.

    The code for the class with the buttons:



    import java.awt.*;
    import java.awt.event.*;
    import java.util.Timer;
    import java.util.TimerTask;
    import java.awt.event.KeyEvent;
    import...
  15. Replies
    33
    Views
    1,441

    Re: repaint() event does not work.

    Is it really relevant?I thought the Frames are a way to define the window.
  16. Replies
    33
    Views
    1,441

    Re: repaint() event does not work.

    I do have a listener for my buttons which is built like a class.
    My code:


    import java.awt.*;
    import java.awt.event.*;
    import java.util.Timer;
    import java.util.TimerTask;
    import...
  17. Replies
    33
    Views
    1,441

    Re: repaint() event does not work.

    What listener are you referring to?
  18. Replies
    33
    Views
    1,441

    Re: repaint() event does not work.

    I'm not that advanced with java so could you please explain some of your used terms?what is JVM,what is the GUI's control?
  19. Replies
    33
    Views
    1,441

    repaint() event does not work.

    Hi!
    I have a java application with multiple buttons.When pressed,every button shows a different painting.One of the button is supposed to display a moving ball.The problem is,the repinat() event...
Results 1 to 19 of 19