Forums Register Login

Displaying AWT widgets in Applets

+Pie Number of slices to send: Send
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
+Pie Number of slices to send: Send
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).]
+Pie Number of slices to send: Send
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
Is that a spider in your hair? Here, threaten it with this tiny ad:
a bit of art, as a gift, that will fit in a stocking
https://gardener-gift.com


reply
reply
This thread has been viewed 979 times.
Similar Threads
How to keep track of the frames that are opened from Applet
Please Help - Remove only the duplicated ITEM and NOT the original item that was duplicated.
Lists
mailing option with applets
JComboBox problem
More...

All times above are in ranch (not your local) time.
The current ranch time is
Mar 28, 2024 13:26:03.