Win a copy of Design for the Mind this week in the Design forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

JFrame in applet

 
Alfred Harre
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 ]
 
Gregg Bolinger
GenRocket Founder
Ranch Hand
Posts: 15302
6
Chrome IntelliJ IDE Mac OS X
  • 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...
 
KR Campbell
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
 
Joe Ess
Bartender
Pie
Posts: 9264
10
Linux Mac OS X 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).
 
Me
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";
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic