javafx的WebEngine问题!急!

迷茫啊迷茫 2013-08-11 10:42:20
在普通浏览器中,当将鼠标指向一个超链接时,这时会在浏览器下方的状态条中就会显示将要连接的url,
那么在javafx的WebEngine中如何去得到这个URL 求高人指点,
另外 拿到URL后, 调用java.awt.Desktop.getDesktop(new URI ("www.google.com" )); 方法打开本机默认浏览器去浏览这个地址,这个方法是否可行?或者有没有更好的方法?
...全文
241 1 打赏 收藏 转发到动态 举报
写回复
用AI写文章
1 条回复
切换为时间正序
请发表友善的回复…
发表回复
李跃东 2013-11-18
  • 打赏
  • 举报
回复
ObservableList<WebHistory.Entry> history= eng.getHistory().getEntries(); for(int i=0;i<history.size();i++) System.out.println(history.get(i).getUrl());
Learn the Fundamentals of JavaFX 8 from Programming Guru Herb Schildt Introducing JavaFX 8 Programming provides a fast-paced, practical introduction to JavaFX, Java’s next-generation GUI programming framework. In this easy-to-read guide, best-selling author Herb Schildt presents the key topics and concepts you’ll need to start developing modern, dynamic JavaFX GUI applications. The book begins with the fundamentals, including the general form of a JavaFX program. You then advance to event handling, controls, images, fonts, layouts, effects, transforms, animations (including 3-D animations), menus, and more. Numerous complete examples are included that put key topics and techniques into action. Designed for Java programmers, the book’s focus is on the JavaFX API and all examples are written entirely in Java. Best of all, the book is written in the clear, crisp, uncompromising style that has made Herb Schildt the choice of millions worldwide. Learn the general form of a JavaFX program Work with scenes and stages Understand the fundamentals of JavaFX event handling Explore several controls, such as buttons, list views, sliders, trees, tables, scroll panes, and more Work with images, fonts, and layouts Explore the JavaFX menu system Use visual effects and transforms Incorporate 2-D and 3-D animation Present data in JavaFX charts Display Web-based content using WebView and WebEngine Table of Contents Chapter 1 JavaFX Fundamentals Chapter 2 Introducing Events and Controls Chapter 3 Exploring JavaFX Controls, Part One Chapter 4 Exploring JavaFX Controls, Part Two Chapter 5 Work with Images, Fonts, and Layouts Chapter 6 Effects and Transforms Chapter 7 Animation Chapter 8 Explore Menus Chapter 9 Charts, WebView, and Canvas

62,614

社区成员

发帖
与我相关
我的任务
社区描述
Java 2 Standard Edition
社区管理员
  • Java SE
加入社区
  • 近7日
  • 近30日
  • 至今
社区公告
暂无公告

试试用AI创作助手写篇文章吧