Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 8561543
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 11, 20262026-06-11T16:31:24+00:00 2026-06-11T16:31:24+00:00

Point p1 = new Point(100, 100); Point p2 = new Point(300, 100); Point p3

  • 0
Point p1 = new Point(100, 100);
Point p2 = new Point(300, 100);
Point p3 = new Point(110, 100);
int x3 = 310;
Point p4 = new Point(100, 100);
static JFrame start = new JFrame("Start");

if(p3.x >= start.getWidth()-90)
{
    p3.x = (int) (p1.getX()+10);
    p3.setLocation(p3.x, p3.y);
    repaint();
}

if(key == KeyEvent.VK_S && !paused)
{
    p1.y++;
    p4.y++;
    p1.setLocation(p1.x, p1.y);
    test1.setBounds(new Rectangle(p1, new Dimension(64, 64)));
    repaint();
    sound.soundPlay(3);
}

In this, the x value of point p3 is supposed to be the same as the value of p1.getX()+10. The value is changed to 100+10, but I have changed 100 to a different value in the second block. How do I update p1 in the first block to match the p1 in the second block?

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-06-11T16:31:25+00:00Added an answer on June 11, 2026 at 4:31 pm

    I have found the answer to my question. This is my new code:

    Point p1 = new Point(100, 100);
    Point p2 = new Point(300, 100);
    Point p3 = new Point(110, 100);
    Point p5 = new Point(310, 100);
    Point p4 = new Point(90, 100);
    static JFrame start = new JFrame("Start");
    
    if(p3.x >= start.getWidth()-90)
    {
        p3.x = start.getWidth()-70;
        p3.x = (int) (p1.getX()+10);
        p3.setLocation(p3.x, p3.y);
    }
    
    if(key == KeyEvent.VK_S && !paintingFBR && !paused)
    {
        p1.y++;
        p3.y++;
        test1.setLocation(p1);
        test3.setLocation(p3);
    }
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

Imagine I have var points = new Point[] { new Point(1, 2), new Point(2,
I want to send an array of point (Point points[] = new point[20]) with
I have found this code for reverse geocoding: var point = new GLatLng (lat[1],long[1]);
I check like this: enter code here var point = new g.LatLng(parseFloat(lat),parseFloat(lng)); var bounds
If I have a PointCollection : var points = new PointCollection(); points.Add(new Point(0, 0));
ScriptEngine PythonEngine = Python.CreateEngine(); Scope = PythonEngine.CreateScope(); Point P = new Point(-1,1); Scope.SetVariable(QWE, P);
The code bellow is the small starting point for a new way ( for
I'm looking for an algorithm to insert a new control point on a Bézier
I'm new on mongoDB and the point is, that we new realize an bug
I am new in share point. I want to select data using java script

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.