Search:

Type: Posts; User: KevinWorkman

Search: Search took 0.08 seconds.

  1. Replies
    11
    Views
    7,806

    Re: JAVA Applet Timer

    You don't need to extend anything, including JFrame.

    You need to create a JFrame, then add a JPanel to it (or use its existing content pane), then add a JLabel to that JPanel. You then need to set...
  2. Replies
    11
    Views
    7,806

    Re: JAVA Applet Timer

    No, this.add(p) is going to add the panel to whatever you've extended, which in this case is a JLabel, which doesn't make any sense.

    I don't think you need to extend anything, actually.
  3. Replies
    11
    Views
    7,806

    Re: JAVA Applet Timer

    Why do you extend JLabel? I see you adding Components to a JPanel, but when do you add that JPanel to the JFrame?
  4. Replies
    11
    Views
    7,806

    Re: JAVA Applet Timer

    What issues are you experiencing?
  5. Replies
    11
    Views
    7,806

    Re: JAVA Applet Timer

    They are probably similar in efficiency. I personally like Swing Timers, but it's really up to you. But either way, I wouldn't impose rules like "I have to use this instead of this" before you...
  6. Replies
    11
    Views
    7,806

    Re: JAVA Applet Timer

    Why is it preferred to use a util Timer instead of a Swing Timer? Why are you using AWT over Swing in the first place?

    But if you insist, the API is your best friend: Timer (Java Platform SE 6)
Results 1 to 6 of 6