Win a copy of Re-engineering Legacy Software this week in the Refactoring forum
or Docker in Action in the Agile forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

open the website entered in JTextField in browser

 
kanika puri
Greenhorn
Posts: 4
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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
Posts: 2539
9
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Use the browse() method from the Desktop class.
 
Maneesh Godbole
Saloon Keeper
Posts: 11021
12
Android Eclipse IDE Google Web Toolkit Java Mac Ubuntu
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
And welcome to the Ranch!
 
kanika puri
Greenhorn
Posts: 4
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
thank you Maneesh and Rob..
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic