|
16 | 16 | import javafx.scene.control.Label;
|
17 | 17 | import javafx.scene.control.TextArea;
|
18 | 18 | import javafx.scene.control.TextField;
|
| 19 | +import javafx.scene.image.Image; |
19 | 20 | import javafx.scene.image.ImageView;
|
20 | 21 | import javafx.scene.input.KeyEvent;
|
21 | 22 | import javafx.scene.input.MouseEvent;
|
22 | 23 | import javafx.scene.layout.Pane;
|
| 24 | +import javafx.scene.paint.Color; |
| 25 | +import javafx.scene.paint.ImagePattern; |
23 | 26 | import javafx.scene.shape.Circle;
|
24 | 27 | import javafx.scene.shape.Rectangle;
|
25 | 28 | import javafx.stage.FileChooser;
|
@@ -66,6 +69,21 @@ public class Client_Room extends Thread implements Initializable {
|
66 | 69 | private FileChooser fileChooser;
|
67 | 70 | private File filePath;
|
68 | 71 |
|
| 72 | + @Override |
| 73 | + public void initialize(URL location, ResourceBundle resources) { |
| 74 | + showProPic.setStroke(Color.valueOf("#90a4ae")); |
| 75 | + Image image; |
| 76 | + if (Login_Signup.gender.equalsIgnoreCase("Male")) { |
| 77 | + image = new Image("View/icons/user.png", false); |
| 78 | + } else { |
| 79 | + image = new Image("View/icons/female.png", false); |
| 80 | + proImage.setImage(image); |
| 81 | + } |
| 82 | + showProPic.setFill(new ImagePattern(image)); |
| 83 | + clientName.setText(Login_Signup.username); |
| 84 | + connectSocket(); |
| 85 | + } |
| 86 | + |
69 | 87 | public void connectSocket(){
|
70 | 88 | try {
|
71 | 89 | socket = new Socket("localhost", 5005);
|
@@ -207,8 +225,5 @@ public void clickEmoji12(MouseEvent mouseEvent) {
|
207 | 225 |
|
208 | 226 | }
|
209 | 227 |
|
210 | | - @Override |
211 | | - public void initialize(URL location, ResourceBundle resources) { |
212 | 228 |
|
213 | | - } |
214 | 229 | }
|
0 commit comments