Results 1 to 7 of 7
  1. #1
    pro85 is offline Member
    Join Date
    Apr 2008
    Posts
    16
    Rep Power
    0

    Default different output

    import java.awt.*;
    import java.applet.Applet;
    import java.awt.event.*;

    public class Steps extends Applet implements AdjustmentListener {

    private Scrollbar steps;
    private int count, numberOfSteps;

    public void init() {
    steps = new Scrollbar(Scrollbar.HORIZONTAL, 0, 1, 0, 100);
    add(steps);
    steps.addAdjustmentListener(this);
    }
    public void paint(Graphics g) {
    int count = 0;

    int x = 20;
    int y = 20;
    while (count < numberOfSteps) {
    g.drawLine(x, y, x + 20, y );
    g.drawLine(x + 20, y, x+20, y + 20);

    x = x + 20;
    y = y + 20;
    count++;
    }
    }

    public void adjustmentValueChanged(AdjustmentEvent e) {
    numberOfSteps = steps.getValue();
    repaint();
    }
    }

  2. #2
    Norm's Avatar
    Norm is offline Moderator
    Join Date
    Jun 2008
    Location
    SW Missouri
    Posts
    17,308
    Rep Power
    25

    Default

    Need a question to do anything with this.

  3. #3
    Eranga's Avatar
    Eranga is offline Moderator
    Join Date
    Jul 2007
    Location
    Colombo, Sri Lanka
    Posts
    11,372
    Blog Entries
    1
    Rep Power
    20

    Default

    Hey pro85,

    You have to clearly mentioned what's your question here. If you didn't to it on next few days, I have to delete this thread. Sorry for that, but since nothing is there to discuss no need keep this thread here in the forum. Others can be confused. So pay your attention there. :)

  4. #4
    pro85 is offline Member
    Join Date
    Apr 2008
    Posts
    16
    Rep Power
    0

    Default result

    i want

    _
    l_
    l_
    l_ this is my result


    but error occur

    _
    l_
    l
    Last edited by pro85; 08-05-2008 at 07:45 AM.

  5. #5
    pro85 is offline Member
    Join Date
    Apr 2008
    Posts
    16
    Rep Power
    0

    Default

    y i can not post the link
    Last edited by pro85; 08-05-2008 at 07:46 AM.

  6. #6
    Eranga's Avatar
    Eranga is offline Moderator
    Join Date
    Jul 2007
    Location
    Colombo, Sri Lanka
    Posts
    11,372
    Blog Entries
    1
    Rep Power
    20

    Default

    Since you don't have total number of 20 posts, it's not possible to post links here in our community. Until that you just put the link text here.

  7. #7
    Norm's Avatar
    Norm is offline Moderator
    Join Date
    Jun 2008
    Location
    SW Missouri
    Posts
    17,308
    Rep Power
    25

    Default

    but error occur
    If you are getting an error, copy the contents of the Java console and paste it here.

Similar Threads

  1. What will be output and why
    By huma in forum Threads and Synchronization
    Replies: 4
    Last Post: 06-26-2008, 10:14 PM
  2. Why the output is always zero
    By mehrotra.chitij in forum New To Java
    Replies: 12
    Last Post: 04-25-2008, 04:05 AM
  3. Output to excel
    By abhiN in forum New To Java
    Replies: 2
    Last Post: 03-07-2008, 01:19 AM
  4. output
    By Camden in forum New To Java
    Replies: 3
    Last Post: 12-01-2007, 10:34 PM

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •