File APIs for Java Developers
Manipulate DOC, XLS, PPT, PDF and many others from your application.
http://aspose.com/file-tools
The moose likes Swing / AWT / SWT and the fly likes open the website entered in JTextField in browser Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


Win a copy of OCA/OCP Java SE 7 Programmer I & II Study Guide this week in the OCPJP forum!
JavaRanch » Java Forums » Java » Swing / AWT / SWT
Bookmark "open the website entered in JTextField in browser " Watch "open the website entered in JTextField in browser " New topic
Author

open the website entered in JTextField in browser

kanika puri
Greenhorn

Joined: Nov 11, 2010
Posts: 4
i m new to java swing and would like to know how to open the website entered by user in JTextField in a browser after clicking on a Jbutton.
Any help would be great.
Rob Camick
Ranch Hand

Joined: Jun 13, 2009
Posts: 2204
    
    7
Use the browse() method from the Desktop class.
Maneesh Godbole
Saloon Keeper

Joined: Jul 26, 2007
Posts: 10486
    
    9

And welcome to the Ranch!


[How to ask questions] [Donate a pint, save a life!] [Onff-turn it on!]
kanika puri
Greenhorn

Joined: Nov 11, 2010
Posts: 4
thank you Maneesh and Rob..
 
wood burning stoves
 
subject: open the website entered in JTextField in browser