Java-Gaming.org Java4K winners: [ by our judges | by the community ]         
Featured games (67)
games approved by the League of Dukes
Games in Showcase (∞)
games submitted by our members



News: Read the Java Gaming Resources, or peek at the official Java tutorials
 
    Home     Help   Search   Login   Register   
Pages: [1]
  Print  
  Java and the web  (Read 1052 times)
0 Members and 2 Guests are viewing this topic.
Offline NeonStormy

JGO n00b
*

Posts: 12


Java games rock!


« on: 2003-11-22 19:28:23 »

How exactly could I make a SWING application view a webpage? Could anyone point me in the direction of a tutorial?
Offline oNyx

JGO Kernel
*****

Posts: 2943
Medals: 5


pixels! :x


« Reply #1 on: 2003-11-22 20:00:28 »

C:\j2sdk1.4.2\demo\jfc\Metalworks\src\MetalworksHelp.java

That's a good starting point. But keep in mind that it's a very basic  "browser".

However it's usually good enough for a help system Smiley

弾幕 ☆ @mahonnaiseblog
Offline tortoise

Full Member
**

Posts: 230


<3 Shmups


« Reply #2 on: 2003-11-25 11:27:30 »

1  
2  
3  
4  
5  
6  
JEditorPane myBrowser = new JEditorPane();

myBrowser.setContentType("text/html");
myBrowser.setPage("http://www.website.com/page.html");

/* add myBrowser to a panel/frame/whatever */


Boom, instant web browser. It will take a little massaging to do exactly what you want, but 99% of the work's done for you.
Games published by our own members! Go get 'em!
Offline NeonStormy

JGO n00b
*

Posts: 12


Java games rock!


« Reply #3 on: 2003-11-25 12:39:22 »

Thanks!
Pages: [1]
  Print  
 
 
Jump to:  

Powered by MySQL Powered by PHP Powered by SMF 1.1.16 | SMF © 2011, Simple Machines Valid XHTML 1.0! Valid CSS!
Page created in 0.079 seconds with 19 queries.