JxBrowser & NetBeans IDE

preview_player
Показать описание
How to download JxBrowser library, create a new project in NetBeans IDE and configure it to use JxBrowser library.

JxBrowser is a Java library that allows integrating MS Internet Explorer, Apple Safari (WebKit) and Mozilla Firefox (Gecko) engines for rendering HTML web pages into Java Swing application.

Рекомендации по теме
Комментарии
Автор

This is because Browser component wasn't designed to be used in UI Form Designers such as the one from NetBeans IDE.

Ikryanov
Автор

@Ikryanov
You are right. Setting Layout of a JFrame to something else than default, works like a charm.

Thank you. :)

RazyMon
Автор

@RazyMon It looks like the reason in layout manager that is used for JFrame content panel.

Ikryanov
Автор

@Ikryanov
First, thank you for fast response.
I added the Browser control via coding (following this tutorial) on already generated frame(using Netbeans designer), and as i mentioned, it doesn't work.
So to be more exact: do i need to CODE my JFrame in order for browser to work or is there a way to add (via coding) the Browser to generated JFrame?

I'm sorry if i'm being unclear, but i can't explain it any better.

RazyMon
Автор

I don't know why, but when i create JFrame using "wizard" and add browser control on it, the browser doesn't show up. Getting it's content returns default html tags even though i added some content to it O_o

RazyMon
Автор

hello, i have a stupid question : how in the world can i preview my index page work in browser using the netbeans programmer??

Archzed
Автор

@RazyMon It would be great if you could provide me the sample that doesn't work for you. You can take a look at the sample that demonstrates how to create a Browser component and embed it into JFrame.

Ikryanov
Автор

In order to load a web page (including local *.html files) you just need to invoke the Browser.navigate() method.

Ikryanov
Автор

I have added link to the video description.

Ikryanov
Автор

@Ikryanov

wwwpastebincom/SG6GYfst

It's just a simple generated JFrame, with browser control "embedded" via code in formWindowOpened event.

If i go and create new JFrame object and add browser control to it, it all works fine. So the problem is with generated JFrame+browser control.

It's not a problem creating new JFrame without netbeans designer, it's just that i already have developed frame waiting for browser control to be added on it.

RazyMon