Вопрос

I am creating a web browser using JavaFX class. I am storing the history of the browser in a file and displaying in on a TextArea. On clicking a URL a webpage should open.The problem is URL cannot be converted into a String. How do i display a URL inside a TextArea or is there any other container to display a URL? However, the same thing is possible if a JEditorPane is used (using javax.swing). Thanks in advance.

TextArea area=new TextArea();
String x="http://www.google.com";
URL url=new URL(x);
area.appendText(url);  // ERROR at this line. URL cannot be converted to a String
Это было полезно?

Решение

Лицензировано под: CC-BY-SA с атрибуция
Не связан с StackOverflow
scroll top