import java.io.IOException; import javafx.application.Application; import javafx.event.EventHandler; import javafx.fxml.FXMLLoader; import javafx.stage.Stage; import javafx.scene.Parent; import javafx.scene.Scene; import javafx.scene.image.Image; import javafx.scene.input.KeyEvent; public class Main extends Application {
@Override public void start(Stage stage) throws IOException {
FXMLLoader loader = new FXMLLoader(getClass().getResource("Scene.fxml")); Parent root = loader.load(); Controller controller = loader.getController(); Scene scene = new Scene(root);
//stage.getIcons().add(new Image("icon.png")); //stage.setTitle("Bro web browser"); stage.setScene(scene); stage.show(); } public static void main(String[] args) {
Soo happy to see you thriving, i remeber u only had 10 k subs but the vids... fkin insane content, happy to see 40k wp sir, which means the good content keeps on comming up ... anyways gratz on hitting 40k and keep up the good work !
Hello Sir, Thank You So Much for the tutorial, It really Helped Me A Lot, Your Videos Are very Useful for programming, KEEP GOING Sir, THANK YOU SIR !!!!!
Hello, Bro. Wanna ask you about this FX stuff and all. Currently is there any sense in using swing? Or FX is the better and bestiest and all? Didnt find a video about trees in swing-playlist and so want to ask this.
At the end of the video it is stated that the code for this project will be available in the Comments section, but there is none. Has this been removed or is it available elsewhwere?
Hi bro I have a doubt? WebView is working fine how to allow download a file. In my Application I need to download .csv file can u please make a video for that....
source code doesnt work in my eclipse Caused by: java.lang.ClassNotFoundException: application.Controller at java.base/jdk.internal.loader.BuiltinClassLoader.loadClass(BuiltinClassLoader.java:606) at java.base/jdk.internal.loader.ClassLoaders$AppClassLoader.loadClass(ClassLoaders.java:168) at java.base/java.lang.ClassLoader.loadClass(ClassLoader.java:522) at javafx.fxml/javafx.fxml.FXMLLoader$ValueElement.processAttribute(FXMLLoader.java:930) ... 17 more
Be sure to add the following to VM arguments: --add-modules javafx.web
package application;
import java.net.URL;
import java.util.ResourceBundle;
import javafx.collections.ObservableList;
import javafx.fxml.FXML;
import javafx.fxml.Initializable;
import javafx.scene.control.Button;
import javafx.scene.control.TextField;
import javafx.scene.web.WebEngine;
import javafx.scene.web.WebHistory;
import javafx.scene.web.WebView;
public class Controller implements Initializable{
@FXML
private WebView webView;
@FXML
private TextField textField;
private WebEngine engine;
private WebHistory history;
private String homePage;
private double webZoom;
@Override
public void initialize(URL arg0, ResourceBundle arg1) {
engine = webView.getEngine();
homePage = "www.google.com";
textField.setText(homePage);
webZoom = 1;
loadPage();
}
public void loadPage() {
//engine.load("www.google.com");
engine.load(""+textField.getText());
}
public void refreshPage() {
engine.reload();
}
public void zoomIn() {
webZoom+=0.25;
webView.setZoom(webZoom);
}
public void zoomOut() {
webZoom-=0.25;
webView.setZoom(webZoom);
}
public void displayHistory() {
history = engine.getHistory();
ObservableList entries = history.getEntries();
for(WebHistory.Entry entry : entries) {
//System.out.println(entry);
System.out.println(entry.getUrl()+" "+entry.getLastVisitedDate());
}
}
public void back() {
history = engine.getHistory();
ObservableList entries = history.getEntries();
history.go(-1);
textField.setText(entries.get(history.getCurrentIndex()).getUrl());
}
public void forward() {
history = engine.getHistory();
ObservableList entries = history.getEntries();
history.go(1);
textField.setText(entries.get(history.getCurrentIndex()).getUrl());
}
public void executeJS() {
engine.executeScript("window.location = \"www.youtube.com\";");
}
}
package application;
import java.io.IOException;
import javafx.application.Application;
import javafx.event.EventHandler;
import javafx.fxml.FXMLLoader;
import javafx.stage.Stage;
import javafx.scene.Parent;
import javafx.scene.Scene;
import javafx.scene.image.Image;
import javafx.scene.input.KeyEvent;
public class Main extends Application {
@Override
public void start(Stage stage) throws IOException {
FXMLLoader loader = new FXMLLoader(getClass().getResource("Scene.fxml"));
Parent root = loader.load();
Controller controller = loader.getController();
Scene scene = new Scene(root);
//stage.getIcons().add(new Image("icon.png"));
//stage.setTitle("Bro web browser");
stage.setScene(scene);
stage.show();
}
public static void main(String[] args) {
launch(args);
}
}
@BroCodez does it export in jar or exe?
This Man is an Absolute LEGEND..!!
One Day you will get for what you have worked hard for.
Soo happy to see you thriving, i remeber u only had 10 k subs but the vids... fkin insane content, happy to see 40k wp sir, which means the good content keeps on comming up ... anyways gratz on hitting 40k and keep up the good work !
Hello Sir,
Thank You So Much for the tutorial,
It really Helped Me A Lot,
Your Videos Are very Useful for programming,
KEEP GOING Sir,
THANK YOU SIR !!!!!
Bro you are amazing. Excellent at all the programming languages. You can talk to a computer in various languages. You resigned your luck
Hello Bro,
I love watching and learning from your videos....thanks
Wow ❤
Pretty good Bro. Bro code is the best.
What version are you using?
Nice learning.. which IDE is being used as a Scene Builder?c, plz answer
Nice! This is breaking into the web scraping!
Do you have a video that covers maintaining login session or/and cookie data?
I commented from my browser!👍
you helped me so much thanks
You are da man, would you make some Android game creating tutorials if you doing it ?
Haven't thought that far ahead yet
@taste01 nope, not meant that, using Libgdx, or normal Android studio using java
Thank you very much a really good guide. How do I upload a webpage without photos and videos? And how do I block ads from the page?
Can you make a simple video editor 😊
What do you do for your career Bro?
Great content!
it is posiblle to send data from a webpage to the app? e.g click on a button and receive a json from the javascript webapp
Thnx!
thank you so much
Hello, Bro.
Wanna ask you about this FX stuff and all. Currently is there any sense in using swing? Or FX is the better and bestiest and all?
Didnt find a video about trees in swing-playlist and so want to ask this.
wow this video I can't beleve how it made
Thank you Bro
Love you * infinity man
At the end of the video it is stated that the code for this project will be available in the Comments section, but there is none. Has this been removed or is it available elsewhwere?
How does one add widevine support? Does this browser support hosts file by default?
hey, and when the site shows a pop-up, how do i show it in my javafx application?
Hi Sir, is it possible to make the webEngine Page background color to transparent? I want only the texts to show in the loaded html page. Thanks
I noticed when the computer is connected through VPN the webpage does not load. How to resolve it?
Bro please when i try to add module to a run configuration its shows that module java fx not found
how do we change the icon of the webview
thx Bro!
Hi bro I have a doubt? WebView is working fine how to allow download a file. In my Application I need to download .csv file can u please make a video for that....
How to reload current selected tab only by pressing f5 with diff url on each tab
poggers
import java.scene.Web.WebView; isn't there...
how can I fix it ?
Hi, is there any way to run a javaFx app on the browser?
sir please make video Auto-detects videos download and Downloading while in own browsing the web.
please sir make this video
source code doesnt work in my eclipse Caused by: java.lang.ClassNotFoundException: application.Controller
at java.base/jdk.internal.loader.BuiltinClassLoader.loadClass(BuiltinClassLoader.java:606)
at java.base/jdk.internal.loader.ClassLoaders$AppClassLoader.loadClass(ClassLoaders.java:168)
at java.base/java.lang.ClassLoader.loadClass(ClassLoader.java:522)
at javafx.fxml/javafx.fxml.FXMLLoader$ValueElement.processAttribute(FXMLLoader.java:930)
... 17 more
I hope bro that you’ll going to upload a video that connects DB in Java
Hmmm... interesting... this dude coded google in 3 minutes
plz hire me NASA
ITs a browser, google is a search engine and running search engines requires billions of dollars invested and several supercomputers working.
@@DetCoAnimeFanIt's a joke
i'll be here in a month... (March 2nd of 2024)
Дрбавь Русские субтитры пожалуйста)🎲⚄⚀