Win a copy of Murach's Python Programming this week in the Jython/Python forum!
  • Post Reply Bookmark Topic Watch Topic
  • New Topic

how do i print or draw a URL in a java applet  RSS feed

 
chris del
Greenhorn
Posts: 2
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi,
I am just writing a very simple java applet search engine. It is meant to simply search one file a= for keyword and then display all corresponding URLs. How do I draw or print out a url in a java applet?
Cheers.
 
Joe Ess
Bartender
Posts: 9406
12
Linux Mac OS X Windows
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
You just want to display the reusuts? Use java.awt.List or java.awt.TextArea.
 
chris del
Greenhorn
Posts: 2
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
I just want to know how to display the results so that each search returns a list of hypertext links which are displayed below. How do i get draw a hypertext link somewhere on a panel?
Cheers
 
Dirk Schreckmann
Sheriff
Posts: 7023
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
I'd be those GUI folks over in the Swing / JFC / AWT forum would have some idea of how to create a hyperlink in a GUI component (such as a Panel). So, I'm moving this thread over to their forum...
 
Nathan Pruett
Bartender
Posts: 4121
IntelliJ IDE Java Spring
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
You can't make an actual 'Hypertext link' on your component... but you can make something pretty close. List the URLs using a List, and add an ActionListener or an ItemListener that calls the showDocument(URL) method of AppletContext when one of the URLs is selected.
 
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!