Win a copy of Spark in Action this week in the Open Source Projects forum!
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Bear Bibeault
  • Ron McLeod
  • Jeanne Boyarsky
  • Paul Clapham
Sheriffs:
  • Tim Cooke
  • Liutauras Vilda
  • Junilu Lacar
Saloon Keepers:
  • Tim Moores
  • Stephan van Hulst
  • Tim Holloway
  • fred rosenberger
  • salvin francis
Bartenders:
  • Piet Souris
  • Frits Walraven
  • Carey Brown

Displaying AWT widgets in Applets

 
Greenhorn
Posts: 3
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
I wrote a small Applet that has java.awt.List widget. When I look at my applet with an Appletviewer if the one of the List items are longer than the width Java automatically puts a horizontal scroll bar. But the same applet when I look through IE5 or Netscape expands to fit the list item string. Please tell me how I can have a constant size for my List item when running the applet in a browser
Thanks
Bo
 
Ranch Hand
Posts: 347
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi Bo!
Here is an example of one solution:

and the html:


<HTML>
<APPLET CODE = "ListTest.class" WIDTH = 640 HEIGHT = 480>
<PARAM NAME=ListWidth VALUE="500">
<PARAM NAME=ListHeight VALUE="100">
</APPLET>
</HTML>


Hope this helps.
Stephanie
[This message has been edited by Stephanie Grasson (edited March 16, 2001).]
 
Greenhorn
Posts: 7
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Cool, This will work. Thanks for your help. I really wish that the Appletviewer and java plugin would behave in a consistant fasion. It would really help us developers
 
God is a comedian playing for an audience that is afraid to laugh - Voltair. tiny ad:
Building a Better World in your Backyard by Paul Wheaton and Shawn Klassen-Koop
https://coderanch.com/wiki/718759/books/Building-World-Backyard-Paul-Wheaton
    Bookmark Topic Watch Topic
  • New Topic