• 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 Pie Elite all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Jeanne Boyarsky
  • Ron McLeod
  • Paul Clapham
  • Liutauras Vilda
Sheriffs:
  • paul wheaton
  • Rob Spoor
  • Devaka Cooray
Saloon Keepers:
  • Stephan van Hulst
  • Tim Holloway
  • Carey Brown
  • Frits Walraven
  • Tim Moores
Bartenders:
  • Mikalai Zaikin

Restore applet from full screen

 
Greenhorn
Posts: 9
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Hi,

I've a java applet that runs in a browser. When pressing f11 in the applet then the applet will be full screen. I put the applet in a frame and set the frame full screen:

(this class extends the Applet class)


But when you press ESC it should be restore the screen from the full screen frame to the browser. I've tried everything to get it work but it won't If you press ESC now it will close full screen but the browser applet has a white screen.

 
Bartender
Posts: 5167
11
Netbeans IDE Opera Java
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
When you add the Applet to the JFrame it is automatically removed from the frame (sharedOwnerFrame?) that the Java plugin creates for it in the browser.

Something like this might work, if this is a JApplet:
  • Assign the JApplet's contentPane to an instance field
  • Add the contentPane to the JFrame
  • Go full screen


  • Close full screen
  • Set the contentPane back to the JApplet


  • When trying this I would suggest you name the variable something other than contentPane so you don't inadvertently hide any similarly named variable in a superclass. I haven't checked whether that might happen, but its better to be safe.
     
    Don't get me started about those stupid light bulbs.
    reply
      Bookmark Topic Watch Topic
    • New Topic