Add Papers Marked0
Paper checked off!

Marked works

Viewed0

Viewed works

Shopping Cart0
Paper added to shopping cart!

Shopping Cart

Register Now

internet library
Atlants.lv library
FAQ
3,49 € Add to cart
Add to Wish List
Want cheaper?
ID number:947535
 
Author:
Evaluation:
Published: 17.06.2020.
Language: Latvian
Level: College/University
Literature: n/a
References: Not used
Time period viewed: 2016 - 2020 years
Extract

2. Programmas kods
package Pakete;
import java.util.Random;
import java.awt.Graphics;
import java.awt.Color;
class P {
public static int[] x = new int[6];
public static int[] y = new int[6];
}

private void Zimet() {
Graphics g = jPanel1.getGraphics();
int w = jPanel1.getWidth();
int h = jPanel1.getHeight();
int xC = w/2;
int yC = h/2;
g.setColor(Color.white);
g.fillRect(0, 0, w, h);
g.setColor(Color.black);
g.drawLine(0, yC, w, yC);
g.drawLine(xC, 0, xC, h);
for (int i=0; i<6; i++) {
g.setColor(Color.red);
g.drawOval(P.x[i] - 2 + xC, yC - P.y[i]-2, 4, 4);
g.setColor(Color.blue);
g.drawString(String.valueOf(i+1), P.x[i]+xC-6, yC-P.y[i]-6);
if (i<5) {
g.drawLine(P.x[i]+xC, yC-P.y[i], P.x[i+1]+xC, yC-P.y[i+1]);
}else{
g.drawLine(P.x[i]+xC, yC-P.y[i], P.x[0]+xC, yC-P.y[0]); // [0] - galapunkts

Author's comment
Load more similar papers

Atlants

Choose Authorization Method

Email & Password

Email & Password

Wrong e-mail adress or password!
Log In

Forgot your password?

Draugiem.pase
Facebook

Not registered yet?

Register and redeem free papers!

To receive free papers from Atlants.com it is necessary to register. It's quick and will only take a few seconds.

If you have already registered, simply to access the free content.

Cancel Register