Skip to content

Instantly share code, notes, and snippets.

@kineticz
Created February 3, 2015 11:22
Show Gist options
  • Select an option

  • Save kineticz/985277b89e92bd9f01ba to your computer and use it in GitHub Desktop.

Select an option

Save kineticz/985277b89e92bd9f01ba to your computer and use it in GitHub Desktop.
Is it ok not to call constructor of super class?
package je3.thread;
import javafx.scene.layout.Pane;
import javafx.scene.paint.Color;
import javafx.scene.shape.Line;
/**
* Created by IDEA on 03/02/15.
*/
public class LinePane extends Pane {
public LinePane() {
Line line1 = new Line(10, 10, 400, 400);
line1.endXProperty().bind(widthProperty().subtract(20));
line1.endYProperty().bind(heightProperty().subtract(20));
line1.setStrokeWidth(5);
line1.setStroke(Color.GREEN);
getChildren().add(line1);
Line line2 = new Line(20, 20, 300, 300);
line2.startXProperty().bind(widthProperty().subtract(10));
line2.startYProperty().bind(heightProperty().subtract(10));
line2.setStrokeWidth(5);
line2.setStroke(Color.BLUE);
getChildren().add(line2);
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment