• 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
  • Liutauras Vilda
  • Jeanne Boyarsky
  • Devaka Cooray
  • Paul Clapham
Sheriffs:
  • Tim Cooke
  • Knute Snortum
  • Bear Bibeault
Saloon Keepers:
  • Ron McLeod
  • Tim Moores
  • Stephan van Hulst
  • Piet Souris
  • Ganesh Patekar
Bartenders:
  • Frits Walraven
  • Carey Brown
  • Tim Holloway

JFrame in applet

 
Ranch Hand
Posts: 73
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
I have an applet that has a JButton on it. I am using applet viewer to open the applet. When I click on this JButton it pops up a new JFrame. Newly popped frame keeps on showing "Applet Started" at the very bottom. This bottom bar even does not show border around it.
#===========================#
# . . . . . . . . . . . . . . . . . . . . . . . ..#
#===========================#
# . . . . . . . . . . . . . . . . . . . . . . . .#
# . . . . . . . . . . . . . . . . . . . . . . . .#
# . . . . . . . . . .JFrame . . . . . . . . . #
# . . . . . . . . . . . . . . . . . . . . . . . .#
# . . . . . . . . . . . . . . . . . . . . . . . .#
#===========================#
| Applet Started . . . . . . . . . . . . . . .|
------------------------------------
I have called
JFrame.setDefaultLookAndFeelDecorated(true);
How can I get rid of this bottom status bar?
Thanks for your help.
[ May 08, 2004: Message edited by: Alfred Harre ]
 
Ranch Hand
Posts: 15304
6
Mac OS X IntelliJ IDE Chrome
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
As far as I know, you can't. Moving to the applet forum in case those guys have something better to say...
 
Ranch Hand
Posts: 124
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
I would be surprised if you could *not* get rid of it. Finding it might be another matter, but as Applet inherits from Container coudn't you getComponents() of the applet and track it down that way? Once you have identified the component it should be a simple matter to subclass Applet and override its behaviour.
Regards,
Ken
 
Bartender
Posts: 9559
12
Mac OS X Linux Windows
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Greg's right. This is considered a security feature. It lets the user know that the frame was created by the applet rather than his local system. Javascript does the same thing (i believe the windows say "Javascript Application" in the status bar).
 
Ranch Hand
Posts: 51
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
By default, the applet security manager adds this message to any windows so the user will know it came from an applet. For applications that is using a custom policy, the text will also appear. You would need to put the following in your security file permission java.awt.AWTPermission "showWindowWithoutWarningBanner";
 
Don't get me started about those stupid light bulbs.
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!