Any Java applet gurus on here?
#1
Scooby Regular
Thread Starter
Join Date: Sep 1999
Location: Swindon, Wiltshire Xbox Gamertag: Gutgouger
Posts: 6,956
Likes: 0
Received 0 Likes
on
0 Posts
Hi folks,
Probably a long shot this, but I'm attempting to write a drop down menu using a java applet (because I need the dropdowns to appear accross frames etc). Now I can get it working fine using the awt PopupMenu class, but these look a bit boring as they only come up in the system default colour and you can't insert images etc.
I've tried switching over to using swing instead, but am having loads of problems. I can get the menu to appear, but it won't cancel when I click on the web page. This works when using awt so I guess it's something to do with the way swing works.
So anyone got any suggestions as to what I should use to create a really nice looking java drop down menu, or is awt the only way to go?
Thanks,
Iain
Probably a long shot this, but I'm attempting to write a drop down menu using a java applet (because I need the dropdowns to appear accross frames etc). Now I can get it working fine using the awt PopupMenu class, but these look a bit boring as they only come up in the system default colour and you can't insert images etc.
I've tried switching over to using swing instead, but am having loads of problems. I can get the menu to appear, but it won't cancel when I click on the web page. This works when using awt so I guess it's something to do with the way swing works.
So anyone got any suggestions as to what I should use to create a really nice looking java drop down menu, or is awt the only way to go?
Thanks,
Iain
#2
Which JVM are you using, if you are using the JVM that comes with the browsers Im surprised it works at all. Try using Suns plugin JVM, although saying that the repainting in Swing doesnt seem to be that great anyway. I think there is some call like repaint you can call after the selection has been made which should do the repainting for you.
#3
Scooby Regular
Thread Starter
Join Date: Sep 1999
Location: Swindon, Wiltshire Xbox Gamertag: Gutgouger
Posts: 6,956
Likes: 0
Received 0 Likes
on
0 Posts
I was using the sun jvm (latest version) and was calling repaint, but it still didn't work. I guess I'll have to stick to awt. Frustrating though, all I wanted to do was change the background colours...
Thanks,
Iain
Thanks,
Iain
#4
Looking back at some of my code, try doing a
getContentPane().repaint()
in both the Menu Listener functions
MenuDeselected
MenuCanceled
You may already have tried it, but...
Oh and thats assuming that you have implemented the MenuListener in your Applet class. Else get the content pane of the Applet then call repaint.
[Edited by CTR - 7/31/2003 10:05:07 AM]
[Edited by CTR - 7/31/2003 10:06:20 AM]
getContentPane().repaint()
in both the Menu Listener functions
MenuDeselected
MenuCanceled
You may already have tried it, but...
Oh and thats assuming that you have implemented the MenuListener in your Applet class. Else get the content pane of the Applet then call repaint.
[Edited by CTR - 7/31/2003 10:05:07 AM]
[Edited by CTR - 7/31/2003 10:06:20 AM]
#5
Scooby Regular
Thread Starter
Join Date: Sep 1999
Location: Swindon, Wiltshire Xbox Gamertag: Gutgouger
Posts: 6,956
Likes: 0
Received 0 Likes
on
0 Posts
Thanks, I'll check but I think I did do that, (although it was late last night so I'm not sure what I was doing tbh ). Looking around on the web, it looks as though all of the commercial menu applets use awt so perhaps swing is just to fiddly to be bothering with...
Cheers,
Iain
Cheers,
Iain
Thread
Thread Starter
Forum
Replies
Last Post