6 Replies - 4971 Views - Last Post: 27 April 2011 - 05:50 PM Rate Topic: -----

#1 Vans1228  Icon User is offline

  • New D.I.C Head

Reputation: 1
  • View blog
  • Posts: 38
  • Joined: 04-July 10

How do you expand a Java Applet to be full screen?

Posted 27 April 2011 - 04:41 PM

Hey guys,
So I'm making a java applet and I hit a problem. I know how to make a frame be extended to fit full screen no matter what monitor I'm using but I cannot figure it out for the applet. I have frames that become visible without an issues but I cannot figure out how to make the applet do so. I use frame.setExtendedState(Frame.MAXIMIZED_BOTH); to make the frame fit to the screen. How do I do that for my applet??
Is This A Good Question/Topic? 0
  • +

Replies To: How do you expand a Java Applet to be full screen?

#2 macosxnerd101  Icon User is online

  • Self-Trained Economist
  • member icon




Reputation: 10646
  • View blog
  • Posts: 39,539
  • Joined: 27-December 08

Re: How do you expand a Java Applet to be full screen?

Posted 27 April 2011 - 04:44 PM

You can't if the JApplet is running on your browser. What you can do, however, is create a JFrame within your JApplet, and have that expand to the full screen.
Was This Post Helpful? 0
  • +
  • -

#3 Vans1228  Icon User is offline

  • New D.I.C Head

Reputation: 1
  • View blog
  • Posts: 38
  • Joined: 04-July 10

Re: How do you expand a Java Applet to be full screen?

Posted 27 April 2011 - 04:58 PM

Thanks a bunch. I have one more question for you. My project requires inheritance and basically what my setup is a home screen where there are three category buttons. When you click a category button it opens a new frame with 5 buttons each representing a community service organization and when you click the organization it opens the website for that organization. How can I incorporate inheritance into this??
Was This Post Helpful? 0
  • +
  • -

#4 macosxnerd101  Icon User is online

  • Self-Trained Economist
  • member icon




Reputation: 10646
  • View blog
  • Posts: 39,539
  • Joined: 27-December 08

Re: How do you expand a Java Applet to be full screen?

Posted 27 April 2011 - 04:59 PM

You could extend JApplet when making your applet, or you could extend JFrame to define the windows. You use inheritance a ton with GUIs.
Was This Post Helpful? 0
  • +
  • -

#5 Vans1228  Icon User is offline

  • New D.I.C Head

Reputation: 1
  • View blog
  • Posts: 38
  • Joined: 04-July 10

Re: How do you expand a Java Applet to be full screen?

Posted 27 April 2011 - 05:15 PM

Yeah I did that I just wasn't sure if you could think of any other way to use inheritance like create a super class and then sub classes and pull them into a GUI. Would I be able to make a class called category which holds 6 selections and each selection is a JButton? or does that not make any sense?
Was This Post Helpful? 0
  • +
  • -

#6 macosxnerd101  Icon User is online

  • Self-Trained Economist
  • member icon




Reputation: 10646
  • View blog
  • Posts: 39,539
  • Joined: 27-December 08

Re: How do you expand a Java Applet to be full screen?

Posted 27 April 2011 - 05:17 PM

You could extend JPanel and define its layout. Same concept as with the JFrame or the JApplet, though. When you extend these classes though, JFrame, JPanel, JApplet, or whatever else you use are the super classes. The subclass is the class you are defining.
Was This Post Helpful? 0
  • +
  • -

#7 Dogstopper  Icon User is offline

  • The Ninjaducky
  • member icon



Reputation: 2874
  • View blog
  • Posts: 11,047
  • Joined: 15-July 08

Re: How do you expand a Java Applet to be full screen?

Posted 27 April 2011 - 05:50 PM

Actually, I'm pretty sure you can do full screen without needing a JFrame. It's done through the GraphicsEnvironment class:
http://www.dreaminco...a-applications/

However, your applet may have to be signed.
Was This Post Helpful? 1
  • +
  • -

Page 1 of 1