-1

I am wanting to display a webpage in the window of my java program, from looking around JWebPane looked to be the easiest way to do this but it's not available anymore and is only available in javafx? Are there any alternative methods to doing this?

jn025
  • 2,755
  • 6
  • 38
  • 73
  • http://docs.oracle.com/javase/tutorial/uiswing/components/html.html – Juned Ahsan Jun 23 '14 at 00:05
  • I already have a made webpage that uses/needs both css/js thus I want to just display the webpage entirely rather than creating html elements using swing – jn025 Jun 23 '14 at 00:06

1 Answers1

2

Take a look at How to Use Editor Panes and Text Panes, which will allow you to display HTML content.

Remember though, Swing's support for HTML is limited to HTML 3.2 and only has limited support of CSS and probably no to little support for JavaScript.

In this case, I might suggest having a look at JavaFX's WebView instead (and no, I've not used it)

MadProgrammer
  • 343,457
  • 22
  • 230
  • 366