Results 1 to 4 of 4

Thread: how can i move Line in graphique with keyboard

  1. #1
    Join Date
    Nov 2008
    Posts
    25

    how can i move Line in graphique with keyboard

    hello,
    i want porgramming i game with java but i am juste start with java i want to know how can i move the line with keyboard and my code here:
    public class Barre extends Frame
    {
    public void paint(Graphics g)
    {
    addWindowListener(new FenetreAdaptateur());
    g.drawLine(100, 100, 120, 100);
    g.setColor(Color.black);

    }
    //Méthode de l'adaptateur Window
    class FenetreAdaptateur extends WindowAdapter
    {
    public void WindowClosing(WindowEvent event)
    {
    System.exit(1);

    }
    }
    //point d'entrée de l'interface
    public static void main(String arg[])
    {
    Barre b=new Barre();
    b.setSize(200,200);
    b.setVisible(true);

    }

    }
    please help me

    best

  2. #2
    Join Date
    Oct 2008
    Posts
    114

    Re: how can i move Line in graphique with keyboard

    Hi manjava,
    The line of code will be different and will be much lengthier to explain here, you can check for your code from the following link:

    https://coloane.lip6.fr/trac/browser....java?rev=1582

    Hope this may help you

  3. #3
    Join Date
    Nov 2008
    Posts
    25

    Re: how can i move Line in graphique with keyboard

    Thanks for the link but the link not work

  4. #4
    Join Date
    Nov 2008
    Posts
    25

    Re: how can i move Line in graphique with keyboard

    I want someone for help me please

Similar Threads

  1. How to move to next line by PHP in text file?
    By Ramona19 in forum Software Development
    Replies: 4
    Last Post: 09-06-2011, 07:09 AM
  2. move cluster resource using the command line cluster.exe
    By faf1967 in forum Windows Server Help
    Replies: 7
    Last Post: 06-04-2010, 01:58 AM
  3. Unable to move to the next line in c++ program
    By Madaleno in forum Software Development
    Replies: 5
    Last Post: 09-02-2010, 09:18 PM
  4. How to let Java read text file line by line.
    By Visala28 in forum Software Development
    Replies: 3
    Last Post: 04-08-2009, 11:30 PM
  5. Move the Mouse with the Keyboard - VisualBasic
    By softte in forum Software Development
    Replies: 2
    Last Post: 14-01-2009, 01:16 PM

Tags for this Thread

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
Page generated in 1,714,066,908.85687 seconds with 16 queries