Semester 3 😎
This commit is contained in:
@@ -8,17 +8,12 @@
|
||||
body {color: #a9b7c6; background-color: #2b2b2b; font-family: monospace}
|
||||
pre {color: #a9b7c6; background-color: #2b2b2b; font-family: monospace}
|
||||
table {color: #888888; background-color: #313335; font-family: monospace}
|
||||
.ST2 {color: #ffc66d}
|
||||
.number {color: #6897bb}
|
||||
.string {color: #6a8759}
|
||||
.comment {color: #808080}
|
||||
.whitespace {color: #505050}
|
||||
.ST3 {color: #9876aa; font-family: monospace; font-style: italic}
|
||||
.ST4 {color: #ffc66d; font-family: monospace; font-style: italic}
|
||||
.ST1 {color: #808080; font-family: monospace; font-weight: bold}
|
||||
.ST0 {color: #287bde}
|
||||
.ST0 {color: #808080; font-family: monospace; font-weight: bold}
|
||||
.literal {color: #cc7832}
|
||||
.ST5 {font-family: monospace; font-style: italic}
|
||||
-->
|
||||
</style>
|
||||
</head>
|
||||
@@ -26,8 +21,8 @@ table {color: #888888; background-color: #313335; font-family: monospace}
|
||||
<table width="100%"><tr><td align="center">/home/caleb/ASDV-Java/Semester 2/Assignments/JavaFX_CalebFontenot/src/javafx_calebfontenot/ShowCircleCentered.java</td></tr></table>
|
||||
<pre>
|
||||
<span class="comment">/*</span>
|
||||
<span class="comment"> * Click </span><span class="ST0">nbfs://nbhost/SystemFileSystem/Templates/Licenses/license-default.txt</span><span class="comment"> to change this license</span>
|
||||
<span class="comment"> * Click </span><span class="ST0">nbfs://nbhost/SystemFileSystem/Templates/Classes/Class.java</span><span class="comment"> to edit this template</span>
|
||||
<span class="comment"> * Click nbfs://nbhost/SystemFileSystem/Templates/Licenses/license-default.txt to change this license</span>
|
||||
<span class="comment"> * Click nbfs://nbhost/SystemFileSystem/Templates/Classes/Class.java to edit this template</span>
|
||||
<span class="comment"> */</span>
|
||||
<span class="literal">package</span> javafx_calebfontenot;
|
||||
|
||||
@@ -40,12 +35,12 @@ table {color: #888888; background-color: #313335; font-family: monospace}
|
||||
|
||||
<span class="comment">/**</span>
|
||||
<span class="comment"> *</span>
|
||||
<span class="comment"> * </span><span class="ST1">@author</span> <span class="comment">caleb</span>
|
||||
<span class="comment"> * </span><span class="ST0">@author</span> <span class="comment">caleb</span>
|
||||
<span class="comment">*/</span>
|
||||
<span class="literal">public</span> <span class="literal">class</span> ShowCircleCentered <span class="literal">extends</span> Application {
|
||||
|
||||
@Override
|
||||
<span class="literal">public</span> <span class="literal">void</span> <span class="ST2">start</span>(Stage primaryStage)
|
||||
<span class="literal">public</span> <span class="literal">void</span> start(Stage primaryStage)
|
||||
{
|
||||
<span class="comment">// Create a pane to hold the Circle</span>
|
||||
Pane pane = <span class="literal">new</span> Pane();
|
||||
@@ -54,20 +49,20 @@ table {color: #888888; background-color: #313335; font-family: monospace}
|
||||
Circle circle = <span class="literal">new</span> Circle();
|
||||
circle.centerXProperty().bind(pane.widthProperty().divide(<span class="number">2</span>));
|
||||
circle.centerYProperty().bind(pane.heightProperty().divide(<span class="number">2</span>));
|
||||
circle.setRadius(<span class="number">5</span><span class="number">0</span>);
|
||||
circle.setStroke(Color.<span class="ST3">BLACK</span>);
|
||||
circle.setFill(Color.<span class="ST3">WHITE</span>);
|
||||
circle.setRadius(<span class="number">50</span>);
|
||||
circle.setStroke(Color.BLACK);
|
||||
circle.setFill(Color.WHITE);
|
||||
pane.getChildren().add(circle); <span class="comment">// Add the circle to the pane</span>
|
||||
|
||||
<span class="comment">// Create a scene and place it in the stage</span>
|
||||
Scene scene = <span class="literal">new</span> Scene(pane, <span class="number">2</span><span class="number">00</span>, <span class="number">2</span><span class="number">00</span>);
|
||||
Scene scene = <span class="literal">new</span> Scene(pane, <span class="number">200</span>, <span class="number">200</span>);
|
||||
primaryStage.setTitle(<span class="string">"</span><span class="string">ShowCircleCentered</span><span class="string">"</span>); <span class="comment">// Set the stage title</span>
|
||||
primaryStage.setScene(scene); <span class="comment">// Place the scene in the stage</span>
|
||||
primaryStage.show(); <span class="comment">// Display the stage</span>
|
||||
}
|
||||
<span class="literal">public</span> <span class="literal">static</span> <span class="literal">void</span> <span class="ST4">main</span>(String[] args)
|
||||
<span class="literal">public</span> <span class="literal">static</span> <span class="literal">void</span> main(String[] args)
|
||||
{
|
||||
<span class="ST5">launch</span>(args);
|
||||
launch(args);
|
||||
}
|
||||
|
||||
}
|
||||
|
Reference in New Issue
Block a user