| First Image |
| Second Image |
| Third Image |
| Final Image |
LinkedList might allocate fewer entries, but those entries are astronomically more expensive than they'd be for ArrayList -- enough that even the worst-case ArrayList is cheaper as far as memory is concerned.Louis Wasserman
private ControllerClass controller;
/*...
Parent root;
FXMLLoader fxmlLoader = new FXMLLoader();
fxmlLoader.setLocation(getClass().getResource("/path/ofYourFxml.fxml"));
controller = fxmlloader.getController();
//Now you can use a method like getter and setter to set or get any value of variable
controller.yourMethodToCall()
Stage stage = new Stage();
stage.setScene(new Scene(root, 1200, 700));
stage.show()
Explaination follows...
| First sketches |
Platform.runLater block like this:
Platform.runLater(new Runnable() {
@Override
public void run() {
// Update UI here.
}
});
Or using lambda Expression:
Platform.runLater(
() -> {
// Update UI here.
}
);
![]() |
| First "Sombrero" character animated |
![]() |
| Logo, probably not the final version |
![]() |
| First animated character |
![]() |
| Basic "Sombrero" character |
![]() |
| "Plants vs Zombies" character |
![]() |
| The cursor should be exactly at the end of the class name |
![]() |
| Alt-Enter pressed |
![]() |
| Fix button shown up |
![]() |
| choose IntelliJ's JUnit distribution |
![]() |
| check the boxes and press ok! |
sudo service network-manager restart please write comments if you have more automated solution for me.
![]() |
| Client Class |
![]() |
| Client Controller JavaFX |
![]() |
| Creating JavaFX application |
primaryStage.show(); to the start method.![]() |
| adding show method to open the stage |
div tags. You can organize the nodes vertically using VBox Parent or horizontally using HBox Parent.
![]() |
| use indexes to organize the nodes |
![]() |
| use hgap and vgap to control the space between grid |
![]() |
| when there is not enough space, the nodes will shrink to fit the window |
ServerSocket ss = new ServerSocket(9999);ServerSocket.accept() method. As soon as connection request is made from client, this method will return a socket that created specifically for this client. ![]() |
| The Server |
Socket s = new Socket(ip, port);![]() |
| The Client |
Socket.close() method is called.
To make a simple chat application, put a Writer and a Reader in a while loop and use a Scanner to take user input.
![]() |
| managing resources before java 1.7 |
![]() |
| managing resources after java 1.7 |
sudo apt-get install git cd ~/.ssh && ssh-keygen leave passphrase empty, just press enter until the key is createdcat id_rsa.pub and copy the entire keygit config --global user.name "john" and git config --global user.email "john.doe@gmail.com" Remember the username and email address muss be the same as the ones used for Github accountcd /path/of/your/application and run these commandgit initgit add -Agit commit -m "any message e.g. 'my first commit'"git remote add origin ssh://login@IP/path/to/repositorygit push -u origin masterThere are two types of Internet Protocols that maintain a network conversation between applications. TCP (Transmission Control Protocol) and UDP (User Datagram Protocol.
In UDP we don't have a continuous connection. Each time a data exchange is done, the relationship is done. Therefore, every package should know where they are going. You must mention IP address and Port number in every package