Results 1 to 8 of 8
  1. #1
    stanish is offline Member
    Join Date
    Oct 2012
    Posts
    3
    Rep Power
    0

    Default Objetct translation

    I translate my object but it is not translate smoothly , i don't want want to use any library function. can u help so that i can translate my object smoothly in x dirextion..

  2. #2
    noctarius is offline Member
    Join Date
    Jun 2012
    Location
    Remscheid, Germany
    Posts
    61
    Rep Power
    0

    Default Re: Objetct translation

    What means translation to you? Which directions? Which libraries?

  3. #3
    AeneasTroy is offline Arma virumque cano
    Join Date
    Oct 2012
    Location
    Indianapolis
    Posts
    20
    Rep Power
    0

    Default Re: Objetct translation

    Are you using swing?

    Java Code:
    JFrame myFrame = new JFrame();
    pack();
    setVisible(true);
    setLayout(null);
    
    JButton myButton = new JButton("Click me!");
    myFrame.getContentPane().add(myButton);
    
    myButton.setBounds(10,10,100,20);
    Then later, you could move it like this:
    Java Code:
    myButton.setBounds(100,100,100,20); //to the new location.  setBounds(x,y,width,height);
    The important parts are setLayout(null) and setBounds(x,y,width,height)
    If I remember correctly, it is very hard to move an object if you are using a layout.

  4. #4
    DarrylBurke's Avatar
    DarrylBurke is offline Member
    Join Date
    Sep 2008
    Location
    Madgaon, Goa, India
    Posts
    11,242
    Rep Power
    19

    Default Re: Objetct translation

    Quote Originally Posted by stanish View Post
    i don't want want to use any library function.
    Then you can't program in Java.

    db
    If you're forever cleaning cobwebs, it's time to get rid of the spiders.

  5. #5
    stanish is offline Member
    Join Date
    Oct 2012
    Posts
    3
    Rep Power
    0

    Default Re: Objetct translation

    Translation means i want to move object from one point A to point B

  6. #6
    Tolls is offline Moderator
    Join Date
    Apr 2009
    Posts
    12,014
    Rep Power
    20

    Default Re: Objetct translation

    Since there are any number of ways of doing that, in any number of different frameworks, and an even larger number of ways of getting it wrong, don't you think you should supply some more information.
    And possibly even some code?

    (Any code posted should be wrapped in [code] tags [/code])
    Please do not ask for code as refusal often offends.

    ** This space for rent **

  7. #7
    noctarius is offline Member
    Join Date
    Jun 2012
    Location
    Remscheid, Germany
    Posts
    61
    Rep Power
    0

    Default Re: Objetct translation

    Point A and Point B are different server systems or different frameworks or different ...?

  8. #8
    Tolls is offline Moderator
    Join Date
    Apr 2009
    Posts
    12,014
    Rep Power
    20

    Default Re: Objetct translation

    I think they're talking "translation" as in images.
    So moving their image from one point on the screen to another.
    wiki.
    Please do not ask for code as refusal often offends.

    ** This space for rent **

Similar Threads

  1. Replies: 5
    Last Post: 08-01-2012, 08:08 AM
  2. Compilator translation
    By claudiocarcaci in forum Advanced Java
    Replies: 14
    Last Post: 07-31-2012, 12:40 PM
  3. Java Translation
    By hello_world in forum New To Java
    Replies: 6
    Last Post: 02-09-2012, 12:14 PM
  4. Language translation
    By archanaanbu in forum Java Applets
    Replies: 13
    Last Post: 02-19-2011, 06:56 PM
  5. Language translation
    By archanaanbu in forum Java Applets
    Replies: 0
    Last Post: 02-09-2011, 05:21 AM

Tags for this Thread

Posting Permissions

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