wood burning stoves 2.0*
The moose likes Applets and the fly likes JFrame in applet Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login
JavaRanch » Java Forums » Java » Applets
Bookmark "JFrame in applet" Watch "JFrame in applet" New topic
Author

JFrame in applet

Alfred Harre
Ranch Hand

Joined: Apr 29, 2004
Posts: 73
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

Joined: Jul 11, 2001
Posts: 15299
    
    6

As far as I know, you can't. Moving to the applet forum in case those guys have something better to say...


GenRocket - Experts at Building Test Data
KR Campbell
Ranch Hand

Joined: Mar 26, 2004
Posts: 124
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

Joined: Oct 29, 2001
Posts: 8971
    
    9

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).


[How To Ask Questions On JavaRanch]
Me
Ranch Hand

Joined: Dec 01, 2003
Posts: 51
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";
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: JFrame in applet