test
This commit is contained in:
parent
37776af5db
commit
ab03d5f10c
4045 changed files with 286212 additions and 3 deletions
65
.config/Code/User/History/60cd7900/qQiQ.java
Normal file
65
.config/Code/User/History/60cd7900/qQiQ.java
Normal file
|
@ -0,0 +1,65 @@
|
|||
package com.jb;
|
||||
|
||||
import javafx.application.Application;
|
||||
import javafx.geometry.Pos;
|
||||
import javafx.scene.Scene;
|
||||
import javafx.scene.control.Button;
|
||||
import javafx.scene.layout.StackPane;
|
||||
import javafx.stage.Stage;
|
||||
|
||||
public class Main extends Application{
|
||||
|
||||
private int noOfTabs;
|
||||
|
||||
private StackPane root;
|
||||
private Scene scene;
|
||||
private static Button newTabBtn;
|
||||
|
||||
@Override
|
||||
public void start(Stage stage){
|
||||
noOfTabs = 1;
|
||||
root = new StackPane();
|
||||
scene = new Scene(root);
|
||||
scene.getStylesheets().add(getClass().getResource("style.css").toExternalForm());
|
||||
|
||||
BrowserTab tab = new BrowserTab();
|
||||
root.getChildren().add(tab);
|
||||
// tabPane = new TabPane();
|
||||
|
||||
// root.getChildren().add(tabPane);
|
||||
|
||||
// BrowserTab1 tab = new BrowserTab1();
|
||||
// tab.getWebEngine().load("https://www.google.com");
|
||||
// tabPane.getTabs().add(tab);
|
||||
initializeButton();
|
||||
|
||||
stage.setScene(scene);
|
||||
stage.show();
|
||||
|
||||
}
|
||||
|
||||
private void initializeButton(){
|
||||
newTabBtn = new Button("");
|
||||
StackPane.setAlignment(newTabBtn, Pos.TOP_LEFT);
|
||||
newTabBtn.setId("new-tab-button");
|
||||
newTabBtn.setTranslateX(noOfTabs*150 + 7.5);
|
||||
root.getChildren().add(newTabBtn);
|
||||
|
||||
newTabBtn.setOnAction(e -> {
|
||||
|
||||
});
|
||||
|
||||
}
|
||||
|
||||
public static void main(String[] args){
|
||||
launch(args);
|
||||
}
|
||||
|
||||
public static Button getNewTabBtn(){
|
||||
return newTabBtn;
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
||||
}
|
Loading…
Add table
Add a link
Reference in a new issue