• Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

Displaying AWT widgets in Applets

 
koralage
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
 
Stephanie Grasson
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).]
 
Bo Koralage
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
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic